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

EE Pages Module: best way to create navigation?

Development and Programming

stevo_s's avatar
stevo_s
176 posts
17 years ago
stevo_s's avatar stevo_s

Hi,

Just trying out the EE pages module. Looks good.

What I’m after is creating a static section of a website, with sidelinks that match the structure and possible 2 levels of navigation.

I’ll create a new template for this section and use that, but what would be the best way to handle navigation sidelinks? Would the best thing be to embed a core template that just has the sidelinks in it, and update that everytime I add new static pages?

       
Cocoaholic's avatar
Cocoaholic
445 posts
17 years ago
Cocoaholic's avatar Cocoaholic

Hi stevo_s,

I’m working on a simple plugin that returns a list of links to your static pages created with the EE Pages Module. If you really need something fast I can PM you the beta.

Cheers.

       
stevo_s's avatar
stevo_s
176 posts
17 years ago
stevo_s's avatar stevo_s

no mad rush, i’ll wait till you are happy to release it.

I’ll try the embed thing first and see how much hassle it becomes.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

Mmm, Cocoaholic that sounds like a winner. If we could give these static pages parents, like in the old Pages module then a really nice navigation module could be written up, I’m sure.

I’m writing here to make sure I’m subscribed to this thread and I await your release as well!

       
Cocoaholic's avatar
Cocoaholic
445 posts
17 years ago
Cocoaholic's avatar Cocoaholic

I will be away for the weekend but I’ll pick this up again on Monday.

A beta version can be downloaded here.

This version already has quite some features, parameters, variables, conditionals etc, so it should work for most people. Bug reports and suggestions are always welcome.

Enjoy the weekend!

ps. the EE team might be working on some tags for the Pages module, so if I need to change the name of this plugin just let me know.

EDIT: Obviously this plugin only works with EE 1.6 and the new Pages module installed.

       
rockthenroll's avatar
rockthenroll
485 posts
17 years ago
rockthenroll's avatar rockthenroll

Wow that’s quick, Cocoaholic! I’m looking forward to what happens with this. It’s great to have it built in, but I’m definitely seeing loop holes like navigation generation that you’re covering.

Hopefully, someone will figure out something with the serach results so they don’t have to go through a template path!

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

Hi, Cocoaholic - I hope you’ll submit this to our add-on library. =)

       
Cocoaholic's avatar
Cocoaholic
445 posts
17 years ago
Cocoaholic's avatar Cocoaholic

@Lisa,

I’ll add it next week, when it’s ready 😉

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

You rock, thanks =)

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

That looks slick, Cocoaholic! I might make a new status called “Nav” (i.e. Open, Closed, Draft, Nav) and then call out every EE Page with the staus of “Nav” to generate my navigation. Can’t wait to play with this.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

I could actually use this right now on the site I’m developing, except that {count} doesn’t seem to be working, FYI. I have my nav being output, but need the last <li> to have a different class. I generally do that by stating something like: {if count == total_results}class=”last”{/if}. Almost there with it…and it’s only a .5 beta!

       
Christopher Simmons's avatar
Christopher Simmons
68 posts
17 years ago
Christopher Simmons's avatar Christopher Simmons

Oh, good. I was about to start working on a plugin like that for the site I’m working on now, and I decided to drop by the forums and see if I was missing anything… Good thing I did.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

See if you can get {count} working! 😉

       
Cocoaholic's avatar
Cocoaholic
445 posts
17 years ago
Cocoaholic's avatar Cocoaholic

Hi all,

I just updated the plugin and would love some more feedback before I submit it to the add-on library.

download link

These are the changes.

Added parameters: switch=”one|two”

Added variables: {count} {item_total} {switch}

@mdesign, I added the “total_results” variable but named it “item_total” to avoid possible conflicts.

       
Cocoaholic's avatar
Cocoaholic
445 posts
17 years ago
Cocoaholic's avatar Cocoaholic

Released the plugin!

Changes:

Switched to the weblog “switch” style introduced in EE 1.5.2 (can switch more than 2 values)

Example:

{exp:pages_menu}
{switch="red|white|blue"}
{/exp:pages_menu}

instead of:

{exp:pages_menu switch="red|white"}
{switch}
{/exp:pages_menu}
       

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.