Jump to content

MuchDev

Members
  • Posts

    378
  • Joined

  • Last visited

  • Days Won

    1

Community Answers

  1. MuchDev's post in Custom sort order for pages was marked as the answer   
    I would create a multiple select page field on the template that you are using to control your navigation. Either point the page field to the parent of your navigational elements or use a asm field and filter by template. Then instead of performing your find on the pages you will just load the field. 
    <?php $navigation_elements = $pages->get('/setting-page/')->navigation; foreach($navigation_elements as $elem){ //nav code here } ?>
  2. MuchDev's post in Sitemap for Parent/Children Only was marked as the answer   
    Are you wanting this in xml, or are you wanting to create an html page, or is this to output the markup for your navigational elements? You could make a recursive looping function and feed it the parent element and in that loop call itself to output what you need from the child elements. There are a couple examples from sitemap examples in Ryans sitemap.xml generator, or my lill guy that I based off his that outputs a sitemap in json. 
    Ryan's - https://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/?hl=sitemap
    Mine - https://processwire.com/talk/topic/11015-json-sitemap/?hl=sitemap

    You could also try out soma's module if you are looking for something already done. 

    Let me know if you want me to give you a mod on my function. 
  3. MuchDev's post in Tag locations (Is this a module?) was marked as the answer   
    Thanks !!! I knew I'd seen this. I just couldn't remember what this was called. 
    This is a great point, I have that module, I'll do this ! 
    You are awesome guys thanks for the perfect advice.
×
×
  • Create New...