Hi Mark … an observation .. and, maybe an issue
{exp:pages_nested_menu root="/main/" include_ul="yes" include_root="no" depth="1"} <a href="http://{pnm_page_url}" title="{pnm_title}">{pnm_page_title}</a> {/exp:pages_nested_menu}
Firstly .. page_title is a custom field .. I’m using different a “user friendly” title (custom field {page_title}) for the page and indexes and an “formal” title {title} .. and your pi seems to work OK with a custom field ..
Secondly .. with the above, I’m getting some funny formatting .. like a stray <ul> and unescaped <li> in the first line … is it me or pi?
I notice the same thing in some of the examples above, too …
<ul><li>
<a href="http://.../main/contact/" title=" ... ">contact information</a>
<ul><li>
<a href="http://..." title="...">this site subscribes to the HON Code</a>
[etc ... the rest is oK]
</ul></li>
</ul>
actually .. its me, the page validates OK .. but, why the cascading <ul>’s when {include_root} is set to no?
I a really interested in the crumbs plugin but I can’t seem to get it to work. I’ve installed the plugin and it shows up in my plugin list.. Here’s my code:
<ul id="crumbs">
{exp:pages_crumbs root="/news/" include_ul="no" include_root="yes" depth="3"}
<li><a href="http://{pc_page_url}" title="{pc_title}" class="here">{pc_title}</a>/</li>
{/exp:pages_crumbs}
</ul>
This is what is outputted.
<pre><code> <ul id=”crumbs”>
</ul>[/code]
nada. Not sure what I could be doing wrong. Does this only work with static pages?
@tulkul - I’m a little confused. The cascading <ul > is semantically the correct way to mark up nested lists. Maybe I’m misunderstanding your question though. Can you provide a full code example of where there are extra <ul >’s? Thanks!
@studio805 - The crumbs plugin only works with the new-to-1.6 Pages module. However, I think your confusion is that you need to be using the Pages Nested Menu plugin to create a menu like you would expect. However, if you are trying to create crumbs, then you don’t want to include the root, include_ul, include_root, or depth parameters. You can read more about each one here: docs.markhuot.com
I’m having similar trouble as the others. I REALLY want this to work, so I’m hoping you can help me out.
I have a list of pages and it’s taking the first page (alphabetically) and making that the ‘root’. I have the root off, and it isn’t displaying the index page for the section/weblog, which is good.
What’s odd is that there’s just no reason the first page alphabetically should be seen as a parent page. All but one of the pages in this section/weblog share the same template.
Fantastic work as usual, Mark! You’re a lifesaver, these plugins provide much-needed functionality which I found was absent from EE up until now.
I’m using the breadcrumb plugin and it works great, except in one situation: one the home page, which is a static page with the Pages URI of “/”. Here the output from the breadcrumb plugin is simply blank.
It works fine on all the subpages though, where the home page does show up properly at the start of the breadcrumb. Very strange!
@44sunsets - The home page wouldn’t appear in that instance, I believe, because the last page in the trail is always left off. If it’s the homepage though, you should be able to hardcode a link in there, no?
@jasonreedwebdesign, @Richard Frank, etc. - This is a ‘bug’ that I am aware of and still struggling with. Could you please post a list of your categories and where they are breaking down? It’d help if I could see some real world data before releasing any ‘fixes.’
Hi Mark
Here we go. Thanks for working on this.
Code:
{exp:pages_nested_menu root="/practice-areas/ip/copyright/" include_ul="yes" include_root="no" depth="1" order="entryorder"}
<a href="http://{pnm_page_url}" title="{pnm_title}">{pnm_title}</a>
{/exp:pages_nested_menu}
Output:
<ul>
<li><a href="http://domain.com/index.php/practice-areas/ip/copyright/subsistence-of-copyright/" title="Subsistence of Copyright">Subsistence of Copyright</a>
<ul>
<li><a href="http://domain.com/index.php/practice-areas/ip/copyright/subsistence-of-copyright/" title="Subsistence of Copyright">Subsistence of Copyright</a></li>
</ul>
</li>
</ul>
Hi Mark
I’ve worked around the above issue since, but I’ve found another ‘bug’ which hopefully is easier to fix.
It’s hard to describe, but basically the exp:pages_nested_menu with the root parameter does not return anything when you have more than one second-tier in your pages setup
So a pages setup like this works: a/b a/c a/d
Also, a pages setup like this works:
a/b/1 a/b/2 a/b/3
But this doesn’t work: a/b/1 a/b/2 a/c/1 a/c/2
In the above instance I can generated a nested menu with root=a, but I can’t with root=b or root=c, i.e the second tier roots.
I first found the error when adding new pages to my hierarchy, but I also reproduced it with a clean set of URLs just to make sure that it was a bug.
I need to sort by multiple fields - is this possible?
Right now I’ve got multiple weblogs and custom field groups being used in the pages module. You can’t order two names identically, so I have ‘principle_order’ and ‘criterion_order’. My sort needs to look like this (I’ve used … so I don’t have to type it all out):
principle 1
criterion 1
criterion 2
....
criterion 10
criterion 11
principle 2
...
principle 10
principle 11
By default it is ordering it like this:
principle 1
criterion 1
criterion 10
criterion 11
criterion 2
principle 10
principle 11
principle 2
Any way to get this to work?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.