Jump to content

applab

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by applab

  1. Hi Manaus, how about adding page.template to $twigvars before the call, eg. $twigvars = array("page" => $page, "template"=>$page->template->name); then in your twig template having: {% if template == "project" %} disclaimer: i haven't tried this, i'm just thinking out loud.
  2. Having used Bootstrap 2 and Foundation 4 I have a definite preference for Foundation, but that might just be my pathological avoidance of "the popular option". Contrary to your experience Joss, I found Bootstrap to be the *more* clunky of the two. If all you need is a mobile-friendly responsive grid then take a look at http://arnaudleray.github.io/pocketgrid/
  3. Maybe something like the "Amazon Elastic Compute Cloud"? (http://aws.amazon.com/ec2/) According to that page... "... increase or decrease capacity within minutes, not hours or days. " "On-Demand Instances let you pay for compute capacity by the hour with no long-term commitments." I haven't used it so can't comment on what it's like in practice, but it sounds promising in principle.
  4. Hi pogidude, This won't handle dependencies but will allow you to load scripts on per-page basis... In your master template place the following code <?php foreach($config->scripts->unique() as $file) echo "\n\t<script type='text/javascript' src='$file'></script>"; ?> In your partial templates add $config->scripts->append("/path/to/script.js"); You can also do the same with styles: // in master <?php foreach($config->styles->unique() as $file) echo "\n\t<link type='text/css' href='$file' rel='stylesheet' />"; ?> // in sub-template $config->styles->append("/path/to/style.css");
  5. hi apeisa, Thanks for the pointer. I haven't built an admin module yet, is this what you're referring to? https://github.com/ryancramerdesign/ProcessHello cheers, Martin.
  6. Hi Adrian, Thanks for the welcome, and the link. I can certainly see me finding a use for that module but it doesn't cover my requirements in this instance. I need the fields that are shown to be dependent not on the currently logged in user, but the on the type of user being editing. I.e. It will always be 'staff' who are in the back-end editing 'students' & 'agents', but I'd like a different set of fields depending on which it is. My current thinking is along these lines: 1) create 3 roles [staff,agent,student] 2) add all fields for all roles to the user template 3) use a hook to hide some fields depending on the role of the edited user (not the editing user!) If anyone with more experience can see a flaw in my plan or suggest a better method then I'm all ears. thanks, Martin.
  7. Hi All, Another ex-modxer here. After 6 years of Evo I've tried my best to bond with Revo and it's just not happening. I've built one simple site with PW and it was a delight to work with so now I'm hoping it's able to cope with the next two projects I have lined up, both of which are quite involved. If I was doing my next project in Modx it would require several custom db-tables and I'd be coding a number of custom admin screens whereas with PW I get the impression that I could do *everything* using standard features. Anyway, here's my first question... The site I'm working on has three types of users (ok, 4 if you include 'guest'). Only one type ('staff') will have access to the backend. The two front-end user types are 'student' & 'agent'. The fields I need to store for 'student' are different to those for 'agent', which are different to those for 'staff'. So, is it possible to have a different set of fields available for each user type? Any pointers on how I might approach this in PW would be much appreciated. Thanks, Martin.
×
×
  • Create New...