Hi Mark,
This plugin is amazing.
One thing I noticed is that it might be bugging out when displaying dates. Here’s my loop:
{exp:pages_nested_menu include_ul="yes" root="/test" depth="5" order="entry_date"} {entry_date format="%Y-%m-%d"} - {pnm_title} {/exp:pages_nested_menu}
It displays the titles perfectly, but it keeps showing the same date in the loop. I think it’s grabbing the date from one post and repeatedly shows only that date.
Keep in mind, the above loop is inside this loop:
{exp:weblog:entries weblog="{my_weblog}” limit=”1”} … {/exp:weblog:entries}
Any ideas?
Thanks again.
jiaha, not sure about this, but try prefixing the date variable with pnm_ as described in the documentation: http://docs.markhuot.com/ee/plugins/pages_nested_menu/
Does anyone know of a way to test to see whether the {exp:pages_nested_menu} tag will output any results? At the moment, it’ll output an empty <ul></ul> even if there are no results. I’m hoping there’s a conditional that I can test for to avoid outputting this invalid XHTML.
It would also be great if you could have a parameter called class that assigns a class attribute to the top level unordered list.
At the moment, this is the code I’m using to generate a list of subpages for the current page:
<div class="subpages">
{exp:pages_nested_menu root="page_url" include_ul="yes" include_root="no" depth="1" order="custom_order" status="open" parse="inward"}
<a href="http://{pnm_page_url}" title="{pnm_summary}">{pnm_title}</a>
{/exp:pages_nested_menu}
</div> <!-- end subpages -->
I get these errors when debugging with the plugin fresh out of the box (version 1.18)
Notice: Undefined offset: 82 in /home/plugins/pi.pages_nested_menu.php on line 204
Notice: Undefined offset: 82 in /home/plugins/pi.pages_nested_menu.php on line 204
Notice: Undefined offset: 82 in /home/plugins/pi.pages_nested_menu.php on line 205
Notice: Undefined index: in /home/plugins/pi.pages_nested_menu.php on line 254
Can anyone tell me how I can remove these as it causes trouble when using this plugin to output some XML
Thanks!
Mark can step in with a fix that addresses his intent, but a quick glance looks like it may just be a bit greedy in assignment of custom fields. Try changing line 202 from
if(isset($base[$seg]) === false)
to
if (! isset($base[$seg]) && isset($this->titles->result[$title_counter]))
That changes things - I now get
Notice: Undefined index: order in /home/plugins/pi.pages_nested_menu.php on line 517 Notice: Undefined index: exp_weblog_titles in /home/plugins/pi.pages_nested_menu.php on line 252 Notice: Undefined index: exp_weblog_titles in /home/plugins/pi.pages_nested_menu.php on line 254 Notice: Undefined index: in /home/plugins/pi.pages_nested_menu.php on line 254 Notice: Undefined index: exp_weblog_titles in /home/plugins/pi.pages_nested_menu.php on line 401
Thanks for your help by the way
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.