Forum
Printing sub page region with navigation template
I have a navigation template on a perch page:
`<?php
perch_pages_navigation(
array(
'from-path' => '*',
'levels' => '1',
'template' => array('collections-list.html'),
)
);
?>`
This navigation template needs to print a content region from each sub page similar to the way it print the link i.e
<perch:pages id="pagePath" />
doing something like this
<perch:pages id="myRegion" />
or this
<perch:content id="myRegion" />
Any ideas why this doesn't work and what am I doing wrong?
Thanks in advance
Hello Darren,
If you want to print/return a region, you need to use
perch_content()
orperch_content_custom()
. The functionperch_pages_navigation()
doesn't return the regions of each page.If you want to see what's available to you when you use
perch_pages_navigation()
, you can useperch:showall
: https://docs.grabaperch.com/templates/show-all/thanks Hussien... the :showall function is helpful
How would I setup a perch_content_custom() to return my wanted child values?
Do I simply create an new custom content template? I have seen a few references to using
'page' => '/the-parent-page/*'
within the function array how is this implemented like this maybe?If this is the correct how do I structure template would it be similar to a navigation template i.e