ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

PageListPlus addon (free!) - More options to build your nav menus

October 12, 2010 10:55pm

Subscribe [2]
  • #1 / Oct 12, 2010 10:55pm

    Aaron Fowler

    113 posts

    PageListPlus gives you options to dynamically build navigation menus based on your current page. Build a menu based on the current page, the current page’s parent, or the current page’s root (top-level) parent.

    It also allows you to append and prepend HTML and create a header or link to the page the menu is built from.  And it does everything the native MojoMotor page_list tag does (e.g. the “id”, “class”, and “page” parameters).

    For example:

    {mojo:pagelistplus:page_list start="parent" id="parentnav" header="h2" header_link="yes" prepend="<div class='navlinks'>" append="</div>"}
    
    ouputs something like:
    
    <div class="navlinks">
        <h2><a href="http://example.com/page/parent_page">Parent Page Title</a></h2>
    <p>    <ul id="parentnav"><br />
            <li>...<br />
        </ul><br />
    </div>

    All this for free! But, if you’re a developer and don’t mind taking a look at the code, I would appreciate any constructive criticism, especially in the realm of performance and best practices.

    Download and documentation:
    http://github.com/aaronfowler/mojo-pagelistplus


    Cheers!
    Aaron

  • #2 / Oct 13, 2010 10:02pm

    iamnick

    17 posts

    Aaron,

    Thanks for the heads up. I will check it out. It looks promising.

  • #3 / Oct 16, 2010 11:51am

    iamnick

    17 posts

    Aaron - I’m giving this a go for my main navigation, but running into a small issue. It will not add my id or class parameters to the <ul>

    {mojo:pagelistplus:page_list} - displays fine, with clean <ul>
    {mojo:pagelistplus:page_list class="nav" id="animate"} - outputs <ul> without a class or id

    I’m demoing this on a homepage, with a header embed using the ShowMe plugin. I get the same result when I place this directly on the homepage layout too.

  • #4 / Oct 16, 2010 12:42pm

    Aaron Fowler

    113 posts

    Thanks for catching that bug - it was a stupid mistake on my part.  I’ve fixed it and updated the download link.  Let me know if you have further problems.

    Thanks!

    Aaron

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases