Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. But how do you uncheck all roles, cause they're all already unchecked by default on the admin template?
  2. I wonder how this would work, as the admin template already has all roles "view" unchecked, and the login page is the processwire/login. Since when guest user accesses /processwire/ he gets redirected to the login. Once logged in as an editor, as long as he has has at least some "edit" access to any pages template he gains also access to the admin, else he get's a link to "continue".
  3. You seem to have a $page->template = 'something' in your template.
  4. Cache directory is used by processwire and is not a problem of this module. It should be there already. It will give you errors with every module you install.
  5. There's a tutorial board here in the forums where you would post such examples. I don't think it helps much in here.
  6. No it's not possible, it iterates the tree structure as is. "parent -> childrens -> childrens". You can only set the top root items per a PageArray. Form there these are iterated down the tree. The selector only is used to filter the children of the current nodes.
  7. Relaunch of http://t.co/G8JNuBm1Ov now online using the great #processwire

  8. A new project, we are working on at updateAG, is now online (at least first step, online "reservation" process isn't yet) http://www.walder.ch The data for the shoes are imported from their system va CSV. They then can edit and publish and categorize them as they wish. Soon there will come a reservation process, that's only half implemented yet. It's an ongoing process in all parts and will get reworked or extended by time. They were using Typo3 before and were positively surprized and happy with ProcessWire and think it's all a lot simpler. They can edit all their content only with a rough 15 min crash course "showing" them ProcessWire. Design and concept is from another partner firm, who also executes the print campaigns for the client. Maybe something special to mention: is that we fighted a lot with their product fotos. The plan was to use transparent png's and then so be able to color the background. This lead to a lot of problems with png's and GDlib in general. Plus they delivered the fotos as optimized png's 8bit... etc. Very long story short. With the excellent PIA (PageImageManipulator by horst) and after lot of researching and testing I was finally able to "color a canvas", smash the png on it and have a jpg coming out on the other end! This way, we solved a lot of problems with a simple command and have regained back a lot of flexiblity, lesser artifacts and 10times lesser file sizes at the end.
  9. Soma

    ProcessWire on the web

    @Pete Minutes? Last time I checked, it was like not even a minute
  10. I could show you things in #ProcessWire, you'd never wanted to go back and use another system.

  11. Seems like a weird menu or I don't get it. If it's for a menu, why it needs a "Select page"? I'm not sure MSN is made for that task if it's a nested menu structure cause it used UL//OL style nesting that isn't the same as a Select menu would require. I haven't tried but maybe something like this works for a single level menu. $nav = $modules->MarkupSimpleNavigation; $options = array( "outer_tpl" => "||", "list_tpl" => "||", "item_tpl" => "<option value='{url}'>{title}</option>", ); $content .= "<select id='mobile-nav'>"; $content .= "<option>Select</option>"; $content .= $nav->render($options); $content .= "<select id=''>"; There's JS plugins that can make a Select menu out of a UL list menu.
  12. Soma

    Colors and Time, :)

    Reminds me of Chromachron wehre the author tried to make colors for the hours of the day. http://www.prismo.ch/chromachron/
  13. ImagesManager is made for such tasks.
  14. That's seems like a viable solution, but only for the active current page. You also just set the "item_current_tpl" and that's only for the current active page. If that's the idea that's ok. MarkupSimpleNavigation doesn't change any page context at all. So the $page you have there's is only the current page viewing. When working with a hook, you would have to check for current page with if($child === wire("page")) { // do your markup logic } Taking the example from the readme I linked earlier it would be like: $nav = $modules->get("MarkupSimpleNavigation"); function myItemString(HookEvent $event){ // the current rendered child page $child = $event->arguments('page'); // if current child you're viewing if($child === wire("page")) { $myimage = $child->images->getTag('icon')->width(50); $itemMarkup = "<div class='nav-icon'><img src='{$myimage->url}'></div><a href='{$child->url}'>{$child->title}</a>"; $event->return .= $itemMarkup; // send back the markup that will present a item } } // setup the hook $nav->addHookAfter('getItemString', null, 'myItemString'); // a render will then also trigger the hook above on each item echo $nav->render(); This would allow to have all different logic in your output depending on custom criterias
  15. Hi Peter, that's what hooks are pretty much the solution to all those special cases. There's various examples in this thread, on a example gist https://gist.github.com/somatonic/6258081 And in modules readme: https://github.com/somatonic/MarkupSimpleNavigation#hook-for-custom-item-string-new-in-120 Hope that helps.
  16. How would the page action work then if horizontal?
  17. Ah sorry, it seems I haven't commited it yet or forgot it... It's now updated.
  18. We always use Fredi front end editing module where yu can make page(s) or just certain fields editable that open in a modal after saving it refreshes page. So it's the most easy and straight forward way to implement front-end editing. Or alternatively put edit links to the page edit screen ($page->editUrl) and use them plain or some modal js to open the link in a overlay (iframe) would be something that gives you freedom.
  19. If it's a single page select then you don't foreach as it's not an PageArray. It's the page object already. if($page->feat_home_ppty) { echo $page->feat_home_ppty->title; } Not sure why that comments playing a role here when doing it wrong.
  20. We're lightyears ahead.
  21. I think I found the problem a pushed a fix and it's now v 1.3.4. Good find, thanks for the mention.
  22. I think I see what is causing this but don't fully understand yet as with a new instance it shouldn't be limited by the first. A second call with no arguments it should default to "null" but looks like it's somehow saved but don't get how this happens. In my quick test It's only if you use a PageArray as root page. If using only 1 page as the root it doesn't happen. So for a quick solution you just have to explicit set the root page or items.
  23. Turn off output formatting first. As name is a string and not an object when output formatting is on. Or try $page->getUnformatted(fieldname)->getLanguageValue(lang) Or just this as it's a page native field.. $page->get("name$langId")
×
×
  • Create New...