Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Another would be to hand the items to the outer_tpl. $customPage = $pages->get('/.../'); $item = "<li><a href='{$customPage->url}'>{$customPage->title}</a></li>"; echo $modules->get('MarkupSimpleNavigation')->render(array('outer_tpl' => "<ul>$item||</ul>"));
  2. Theres a config for this command. Not sure that would help.
  3. It's also mentioned on the pagination docu. http://processwire.com/api/modules/markup-pager-nav/
  4. Pro cache builds a static site in cache. Not sure but it maybe could be just copied to root and voila.
  5. Addition.. you could also use selector parent!=id|/path/ to exlude all children.
  6. Of course it's the same but easier to setup and much more flexible than yours You'd have to filter them out here: $sites = $site->children; With like $sites = $site->children("template!=news|events"); And also make sure you got any children before looping: if(count($sites)){ ... Also want to mention $site->numChildren isn't access/published aware ... You'd better do count($page->children("template!=news|events"))
  7. How about http://modules.processwire.com/modules/markup-simple-navigation/ You can also specify a selector in the option array like "template!=news|event" for example.
  8. You can't hide path in between unless you use urls segments. Pete is right, and it will result in url segments anyway. Sure you can build any feature other CMS have. You can build that with url segments too. I would build it the way Pete suggested. You argument that it's not nice to manage under one branch, I have to say I would then build a admin page that let's you list per vender or category, like a data table. Everything possible with ease. See for example my data table POC http://modules.processwire.com/modules/data-table/
  9. Glad you got it working. I couldn't finish the export profile, as it doesn't currently work with multilanguage.. However I commited an update to the module and updated readme to make more sense. https://github.com/mcmorry/PW-language-localized-URL
  10. You just cycle through languages and output page url. Since it is now built in I'm sure there will be also a direct way. Homepage has no url. But I know where you're going.
  11. Yes it isn't saved when selected HTML5 and save...
  12. Soma

    ProcessWire on the web

    page == container == sheet == pixel == many pixels == anything
  13. I'm especially eager to know how it's done and how features as published per individual language can be done (same as in our LanguageLocalizedURL module using checkboxes on each language installed?). Things like how certain future features will affect this way of setup, like versioning etc. So those thing I worried the most when multilanguage came into play, often CMS forget about them or lack features. I'm so happy to see page names are at least a shipped feature in core and thus considered "important" which I'm really thankful. I'm really excited to try it and see test the s... out of it. Since I did part of the LLU module I know how hard it is to do it and cover most scenarios, but I'm sure you did a great job.
  14. Languages module were installed and regular text language fields where ok just not the page title.
  15. No I'm logged in with a editor user. Admin and guest user are excluded yes but others visible. Have you enabled edit access to the user template for editor role? Yes the unpublished users don't have a strikethrough as I think it was missed to add.
  16. Ahh, sorry now I get it, forget it unless you want to really create one. The administer user permission of course... I don't know why unpublished users would be invisible, maybe unintended. Just tested also and it seems to work fine.. I see unpublished users and can create and delete, edit users.
  17. What breadcrumb in the world shows the page your already on?
  18. I actually wouldnt take the route to give editor admin rights just for this. It relatively simple to create a dediacted admin page that lists unpublishes users. It much more confident to do this. Let us know if you need example.
  19. PW keeps surprising you for at least 2 years
  20. Using published option is actually worst and most unelegant. You then can't use published anymore... Option 2 is the simplest and most elegant way to go. If you have no template file you can't view them directly. It's there for this reason.
  21. http://processwire.com/talk/topic/745-module-want-related-pages/page-3 Actually you can just do $articles = $pages->find("category=$cat, limit=10"); It will return pages that have $cat sorted by score. $cat can also be a page array. See edit If you want to even go further and sort them also by modified date, take a look at the module I linked on top. Edit: Actually looking at my module code again, this is the way using PW selector query only. But this way you can't sort them by more than 1 field and it's not near as optimized as the direct sql version. foreach($tags as $tag) { $found = wire("pages")->find("categories=$tag, id!=$page->id, limit=$limit"); foreach($found as $r) $rel[$r->id]++; } // build PageArray and add "score" property $pa = new PageArray(); foreach($rel as $key => $score) { $pa->add( wire('pages')->get($key)->set("score",$score) ); } Now $pa hold the pages and can be sorted by "-score"
  22. Yes addHook is to add a new method to whatever you like. addHookProperty is to add a property to the object. addHookAfter/Before is hooking into events like save etc. You could also go with something like $page->image->greyscale(100,100)->url; and just leave out the size() and do it in greyscale. Endless possibilities.
  23. Yeah, you'd have to do the whole procedure like the Pageimage size() does. Depending on what you want to manipulate, maybe you don't need additional image generated... Anyway, If it's about greyscale a image, I would do it like this in CSS: http://jsfiddle.net/KDtAX/487/ , but maybe not a solution in all scenarios, Opera and Safari5 doesn't seem to work. Edit: Also if you want to have it like $image->size(100, 100)->greyscale(); you already resize and get a new image with size() so why generate one again?
×
×
  • Create New...