We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Pages Crumbs and Pages Nested Menu

Development and Programming

Mark Huot's avatar
Mark Huot
587 posts
17 years ago
Mark Huot's avatar Mark Huot

Hum, certainly an option. I think I like it enough to go with it. In the meantime we’ll see if anyone else is watching this thread and chimes in.

       
tulkul's avatar
tulkul
45 posts
17 years ago
tulkul's avatar tulkul

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?

       
nullbreached's avatar
nullbreached
116 posts
17 years ago
nullbreached's avatar nullbreached

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?

       
Mark Huot's avatar
Mark Huot
587 posts
17 years ago
Mark Huot's avatar Mark Huot

@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

       
jasonreedwebdesign's avatar
jasonreedwebdesign
5 posts
17 years ago
jasonreedwebdesign's avatar jasonreedwebdesign

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.

       
44sunsets's avatar
44sunsets
42 posts
17 years ago
44sunsets's avatar 44sunsets

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!

       
Richard Frank's avatar
Richard Frank
200 posts
17 years ago
Richard Frank's avatar Richard Frank

Having similar problem as jasonreedwebdesign and others.

       
Mark Huot's avatar
Mark Huot
587 posts
17 years ago
Mark Huot's avatar Mark Huot

@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.’

       
Richard Frank's avatar
Richard Frank
200 posts
17 years ago
Richard Frank's avatar Richard Frank

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>
       
Richard Frank's avatar
Richard Frank
200 posts
17 years ago
Richard Frank's avatar Richard Frank

Hi Mark

Any luck with this?

       
Richard Frank's avatar
Richard Frank
200 posts
17 years ago
Richard Frank's avatar Richard Frank

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.

       
Richard Frank's avatar
Richard Frank
200 posts
17 years ago
Richard Frank's avatar Richard Frank

Anyone having similar issues, or am I alone?! ;>)

       
Brian M.'s avatar
Brian M.
529 posts
17 years ago
Brian M.'s avatar Brian M.

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?

       
Mark Huot's avatar
Mark Huot
587 posts
17 years ago
Mark Huot's avatar Mark Huot

Brian M. - Multiple fields is not supported, however computer sorting is a bug. I’ll revise this and get a fix out to make sorting more humane.

       
Brian M.'s avatar
Brian M.
529 posts
17 years ago
Brian M.'s avatar Brian M.

Thanks Mark - once again a great plug-in 😊

       
1 2 3 4 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.