• Content count

  • Joined

  • Last visited

Community Reputation

42 Excellent

About Pixrael

  • Rank
    Full Member

Profile Information

  • Gender
  • Location
    Florida, USA

Recent Profile Visitors

438 profile views
  1. ..or if you want realtime search results, maybe you can try this: https://www.algolia.com/product ( I'm not an affiliate or promo agent )
  2. I always use the Markup Region since it was included in PW .. thanks for your advice, thanks for everything guys, this community is really like a home with friends
  3. I agree with bernhard that this situation is perfect for an ajax solution, but in the parent page I use a javascript plugin that need the markup from the child pages is present in the html output at document ready, not in the dom
  4. abdus: This don't works, if we generated the url segment links with: "./$page->name" we never found that page with: $codeChildName = "code--{$input->urlSegment1}" $pages("name=$codeChildName") because the page with that name doesn't exist but looking at your proposal I found one solution: add a "keyword" to the generated links and then remove that "keyword" after get that url segment.. works perfect! this at the start of my template file: <?php namespace ProcessWire; $wildcard = "-list"; if($input->urlSegment2) throw new Wire404Exception(); if($input->urlSegment1) { $request = $input->urlSegment1; } if($request) { $name = str_replace($wildcard,"",$request); $name = $sanitizer->pageName($name); $codes_page = $pages->get("name=$name"); if(!$codes_page->id) throw new Wire404Exception(); } else { $codes_page = $page->child("include=all"); } ?> then when I generated the links in the template: <?php foreach($page->children("include=all") as $child) { ?> <a href="<?=$child->name.$wildcard?>"><?=$child->title?></a> <?php } ?> and that's all.. it's ok? remember that I'm a graphic designer trying to coding
  5. Abdus: the problem is that in the parent page I generate the links automatic from the name of the child pages, so the links always match the children names.. even if I add "code--" using the API because when I save the page, and later generate the parent page again the links will include "code--".. the only solution is to use a field other than the name ... ID is the best option because is url friendly.. Abdus: Thanks for your contributions to this forum, you are the best teacher for newbies like me, every post of yours seems a tutorial. It's easier to learn new things in them than with the PW documentation.
  6. ... Ooooh. I forgot it.. I'm in Florida (Waiting for the big hurricane uff) ... but is ok, maybe I don't have other solution than the IDs.. and I don't want to my editors to put the information in another place on the page tree when they should be under codes node... So, the last shoot.. the scenario is: Codes (template file) -- Wall Mount (template without file) -- Light Commercial (same as above) Initially Codes render its content (header, body, etc) plus the information of the first child (repeaters with body, pictures, etc) Codes also have a list of links that was generated from its children name as url segments, to load the same Codes page, but with the content from the new selected child .. uff seems more easier to see than to explain ! EDIT: this post should be before the previous from abdus, I delay in publishing it
  7. my path will change from: domain.com/support/codes/wall-mount-mini-split domain.com/support/codes/light-commercial-split to domain.com/support/codes/1087 domain.com/support/codes/1101
  8. abdus: I think your solution don't resolve my problem, I'm still have the match between both urls (segment and existing page), this option only allow me to auto generate the children names, this is not my case. bernhard: this is a correct solution, in the first instance I not use it because the SEO.. maybe I need to use it.. :-( Another solution should be put the "child pages" under another parent (empty template) only for hold it and to avoid conflicts Thanks guys for your time!
  9. I found why :-( https://processwire.com/docs/tutorials/how-to-use-url-segments/page2 "You can use URL segments on any page where your template settings allow, regardless of whether it has children or not. Should there be a child page that has the same name as a URL segment that the parent page's template is looking for, the pages in the tree always have precedence. Meaning, URL segments only apply if the requested URL did not resolve to an actual page. As a result, you should avoid using URL segments where you think the page names and URL segments could collide"
  10. I have a parent page (with template file) with several child pages (without template file) that are hidden and unpublished, I use them only to store information. The parent page have the url segments enabled. When I catch the segment in the template file, works as expected for any word, but if the url segment match the property "name" of any child page, PW launch a 404 Page Not Found.. I try all combination of "hidden" and "Publish" for the child pages. The idea is to render the data from the parent page plus the data of a child page, and get this data using an url segment (links generated dynamically) with the same name that this hidden page have.. I don't like having a template file for these child pages that only execute the render of the parent page with the information .. I want the previous solution if it possible I was able to explain well? ...What happen here?
  11. Yes, I know, but what I need is to insert the images into CKEditor, it looks like I'm finally going to have to do a hanna code for that. Thanks anyway
  12. why webp still is a invalid file extension?? No make sense for me if I only need to use the url to the file in my pages, I'm not processing the image data.. only print the path
  13. It works, but applies the classes to all inputfields, including the form and buttons. Is there any way to ask the type of input (Ex. InputfieldText) before applying the classes? I check the API Reference for inputfield but nothing..
  14. Good job! Maybe you could use bold in the links of the footer, because is not very readable. I like this style!
  15. I like the second solution, I will implement it later. Thank you!