-
Posts
1,699 -
Joined
-
Last visited
-
Days Won
14
Everything posted by renobird
-
To all of you who are new to ProcessWire... 1. Welcome. 2. Ask lots of questions, the community here is friendly and very willing to assist. 3. Just start building something—the learning curve isn't nearly as steep as you might think. 4. It's worth it. Once it starts to click you'll never look back.
-
I could really use this as well. Any other ways to customize the outgoing message in the meantime?
-
Welcome to the world Karena! Nice work Ryan.
-
Diogo, Can't wait to test this tomorrow morning. If it does what I think it does, I'll be on the first plane to Portugal to buy you all the beer you can drink.
-
Yep, that was it — /faculty/ didn't have access rights set. My brain gets scrambled at times with access control, especially when jumping between template based and page based control. Is it beer:30 yet?
-
Thanks Soma, That method works. When I was just trying to use templates to define access it didn't seem to be access aware. Possibly because defining a root page? $rootPage = $pages->get("/faculty/"); Edit: Hmm, nope, doesn't seem to be access aware even without that.
-
Thanks Alan, I think that solution still requires I use a separate template to define view access - right? I'm building an admin area and will end up with a variety of different roles (some of which only need access to a single additional page). Adding new templates just to manage access could get messy quickly in this case. Custom Page Roles is perfect—assuming there's a way to make it play nicely with MarkupSimpleNavigation.
-
Soma (or anyone else that might know), I need to have some role specific pages in my navigation (i.e. only a user with "travel admin" role sees the "travel admin" navigation item). I'm using, Custom Page Roles module to define access on a per page basis—so I'm able set the view access as needed. However, those pages still appear in the navigation for all users. I would usually exclude pages from the navigation by setting the page to hidden, but that won't work in this case, because the page would be hidden from everyone. Is it possible to hide navigation items when the page is not viewable to that user?
-
Hi Ryan, Is your module working with 2.3? Everything works admin side (field is added, and I can select roles), but I can still view the page on the frontend. I've tried the obvious (making sure I didn't have the role, logging out, etc...) — no luck. False alarm. The page wasn't actually viewable. I got confused because it is still showing in my nav (using MarkupSimpleNavigation).
-
I'm using Font Awesome, and wanted to be able to add icon markup to parent pages only. Soma mentioned using "xtemplates", but in my case parent and child pages all use the same template. So after I flew to Switzerland to hand Soma a beer, he suggested I use a hook. This may be useful to someone else, so here's what I did: 1. add a text field called "icon" to your template. 2. add the code below before you call $treeMenu->render(); function addIcon(HookEvent $event){ $page = $event->arguments[1]; if ($page->icon){ $event->return = "<a href='{$page->url}'><i class='icon icon-{$page->icon}'></i> {$page->title}</a>"; } } $treeMenu->addHookAfter('getTagsString', null, "addIcon");
-
So the lesson to be learned here, is /wire/modules/Inputfield/ is my friend. I need to remember to look there before asking my silly questions. Thanks Soma!
-
Is it possible to add additional markup? I need to have a group of fields display in a tabular format.
-
Excellent post from Soma on repeaters and API.
-
Just bashed my head against this for a minute. +1 for the default being 2. Note: I'm not running the latest, so this may already be fixed.
-
Ryan, ROFL! *repeatedly pressing the like button* Phew, that got me.
-
Thanks Soma, Very much appreciated. I was getting too wrapped up in trying to update the existing repeaters. You're method of removing and recreating makes things a lot simpler. I see a flatter.com account in my future.
-
Something I can't get my head around, is how to modify existing repeaters via the API. I can get them output to a form, but I can't figure out how to save the changes (if there are any). In this case, I'm just using text fields.
-
Soma is owed so many kegs of beer by the folks he's helped — he can afford to give some away.
-
I think I just had a seizure. That site is rough on the eyeballs.
-
Hmm — I figured as much. What do you do for forms that need to create (and edit) repeaters? I have a half baked idea: foreach($pages->get("/config/expense-types/")->children() as $cat) { $fieldset = $modules->get("InputfieldFieldset"); $fieldset->label = "Expense Type"; $field = $modules->get("InputfieldText"); $field->label = $cat->title; $field->value = $cat->title; $field->attr("name+id",$cat->title); $fieldset->add($field); $field = $modules->get("InputfieldText"); $field->label = "amount"; $field->attr("name+id",$cat."-amount"); $fieldset->add($field); $form->add($fieldset); } That would create required inputs for all the possible expense types. I think I can sort out how to foreach() the $input->post(s) and save them to repeaters. Not sure how I would pull up the page and edit the repeaters, especially if they need to add new ones? Am I making any sense?
-
Getting "Saving is disabled in this demo." message suddenly.
renobird replied to artaylor's topic in General Support
it happens. -
Hi Soma (everyone else), Is it possible to use repeaters with this method? Any guidance would be appreciated.
-
I don't care who they are, as long as they keep posting.