Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. It doesn't matter it's in a loop or not. And it definately works, I've used it many times with repeaters. Then your problem may lays somewhere else. You also can't assume that next() always returns a page, thus doing something like $page->next()->title is not real world code.
  2. That could be that in memory PageArray filtering doesn't work with count(). Just use a normal find(selector)->count ...
  3. I have a repeater and when doing $firstRepeater = $page->carousel->first(); $content .= $firstRepeater->next(); I can't get the next when I'm not logged in. But with $content .= $firstRepeater->next("check_access=0"); It works. Don't now of anything else that might do the trick.
  4. Then maybe the options field is not .id= but something different. I would try .value= or .data=
  5. What you are looking for is rather something like find selector but with count $count = $page->article_overview_flexible_layout->count("article_overview_flexible_layout_type.id=4");
  6. What is $layout? Well if you use a next() , PW will search for the next repeater page and while they're hidden in /admin they're protected. You could try next("check_access=0") to get around that.
  7. You use wire("page") If rendering a repeater field from another page, let's say echo $pages->get(1001)->render("repeater_field"); So in template/fields/repeater_field.php echo "<p>Page containing the repeater: " . $page->title . " " . $page->id . "</p>"; echo "<p>Page currently requested: " . wire("page")->title . " " . wire("page")->id . "</p>"; // render each repeater echo $value->each("<section><h2>{title}</h2>{body}</section>");
  8. RT @smashingmag: ✎ A beginner’s guide to ProcessWire, a free CMS that offers an easy-to-use and powerful API to handle content: https://t.c…

  9. @pwFoo I don't know exactly what you mean by replace links template. But read the documentation with the part for hook to modify item string etc. https://github.com/somatonic/MarkupSimpleNavigation#hook-for-custom-item-string-new-in-120 And various examples around here https://gist.github.com/somatonic/6258081
  10. Something along the way public function init(){ if($this->config->ajax && $this->input->InputfieldMyAjaxBomb){ // handle your ajax request header('Content-Type: application/json'); echo "{'yo':'yo'}"; exit; } } .. in your Inputfield init(). Then you can make a post or get AJAX request to any backend or public url the current url containing the key InputfieldMyAjaxBomb=1. Edit: Originally I didn't really mean that there's "no need". Well, of course a hidden admin ProcessPage bundled with your module is also good and honestly maybe even the more correct way. But It's easy to implement and test things out too.
  11. @tpr http://modules.processwire.com/modules/email-obfuscation/ does what you need. I'm not the creator of this module, and have no plans to develop it further. I will gladly take pull request if anyone has the time to do so.
  12. Awesome stuff indeed. Any chance to get drafts and preview of pages in core working for all fields? It's the most requested feature among projects and clients. Many other cms have this out of the box. We are now telling clients since 5 years that it will be maybe possible soon. Now there's ProDrafts and we can't use it cause it's not working for Repeaters, PageTables and so on.
  13. @yellowled was ist denn das für ein Kunde!? :)

  14. Why do you modify core module? You can enter those in the backend on the configuration of this module.
  15. $partnerTitle = $pages->find("parent=1004,partnerID=$partnerID")->title; Will not work cause find() returns a page array and not a single page. Rather use $partnerTitle = $pages->get("parent=1004,partnerID=$partnerID")->title; Or even $partnerPage = $pages->get("parent=1004,partnerID=$partnerID"); $partnerTitle = $partnerPage->id ? $partnerPage->title : "PartnerPageNotFound"; But why you need a function for that is beyond me. And also why there's obviously an ID you enter manually to then get a page? Why not use a page field to select the partner page?
  16. Nice we now moved from a plain module list (PW2.1) to sections for sake of overview, now you make it flat again with this module I think while it's nice to have all these steroids, it's something I'm trying to keep away from doing too much admin tweaking. Some of these should be considered in core and not via such an module. It's prone to errors and confusions once core admin changes stuff around. Not trying to drag you down. Just my 2 cents.
  17. http://buildinternet.com/project/supersized/
  18. It says 500. https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Selectors.php#L24
  19. Then it seems your server doesn't allow Directory listings +Indexes. Nothing to do with PW.
  20. FilenameArray is just a helper class not a Wire class like Page or Pages.
  21. It's the Options -Indexes In the .htaccess that prevents directory listing.
  22. No need for a extra Process page. Just send a ajax POST/GET request with a special key you recognize in your module's init(), do the work and send back an result.
  23. I just updated the module to support also href='mailto
  24. I think actually the problem is in the details. The module's regex doesn't seem to account for href=' only for href=" So this should be: if($l->adr_email) $out .= "<a href=\"mailto:$l->adr_email\" class='link_mail'>$l->adr_email</a> <br>";
×
×
  • Create New...