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

New Module: Structure - Uses entries to create a page hierarchy for static and listing pages

Development and Programming

vik407's avatar
vik407
15 posts
16 years ago
vik407's avatar vik407

Hi bjsteiger, you need to send the “start from” variable to draw the full menu. like:

{exp:structure:nav_sub start_from="/about"}

Tip: use {segment_n} templates variables.

       
bjsteiger's avatar
bjsteiger
87 posts
16 years ago
bjsteiger's avatar bjsteiger

That works for showing the secondary navigation, but not the third level?

       
28Bytes's avatar
28Bytes
192 posts
16 years ago
28Bytes's avatar 28Bytes

I have been using structure for a while and it rocks. I am ready to turn a project over to a client so I created a user group gave them access to structure. Now when they go to edit a page in structure when they hit submit it turn the status to closed. Do I need to do something to not make that happen or is this some type of speed bump?

Thanks in advance.

       
Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

@PenGwnFistOfFury Make sure your weblogs have a status group assigned. Not having a status group assigned is usually the cause of what you describe.

       
28Bytes's avatar
28Bytes
192 posts
16 years ago
28Bytes's avatar 28Bytes

Awesome thanks Fred.

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

@bjsteiger you could use current segments like @vik407 said to only show the levels you want per page, but if you want something automated you’d have to add code. Depth may come someday, but is not in the works at this time.

       
Narzula's avatar
Narzula
69 posts
16 years ago
Narzula's avatar Narzula

Greetings,

Is there a way to use the Structure navigation with a Superfish-style pop-up menu (vertical)? Structure adds classes to the list items which would require Superfish classes. Is there a menu system you’d recommend for similar pop-out menus if not?

Also, I’ve become aware that Nav Item > Child Item > Grandchild Item isn’t possible unless I hardcode the initial “Nav Item”. Would be nice if the structure could be reflected in the navigation, but this request has already been made.

Thanks for your support and work

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

@madrugada you could probably find a similar method and use the start_from parameter for each top level nav point, but I don’t know of a link off hand.

       
saul's avatar
saul
6 posts
16 years ago
saul's avatar saul

This has the potential to be an awesome addition to expression engine, I’m not sure what the appropriate process for feature requests is - so I’ll just post them here.

  1. Rather than just appending an ‘id=nav’ onto the main navigation tag output - how about letting us pass in a prefix, that would allow us to use he same tag for a footer navigation without having the hard-coded ID conflict.

  2. I’ve already implemented this but it’s certainly worth mentioning - I had to assign icons to specific nav items - I needed unique ID’s on the li’s - so I’m using the slug function you already had in place. I’m sure others would like unique hooks into individual nav items.

  3. I honestly LOVE the parent_title tag - wish there was a page_title tag as well (yes I know it’s trivial) but why do the one and not the other.

Just a few thoughts.

Love the energy you’ve put into this. Keep up the good work..

       
poThree's avatar
poThree
50 posts
16 years ago
poThree's avatar poThree
       
saul's avatar
saul
6 posts
16 years ago
saul's avatar saul

poThree - I’m sure you’ll get an official reply pretty quick - but my 2 cents is that you can try to use the sitemap tag and some CSS to show only the section of the heirachy that you want - could be challenging, but the sitemap tag appears (at least with the current release) to be the only way to get a nested heirachy that includes your ‘MAIN’ (top level) pages

HTH

       
nomolos's avatar
nomolos
24 posts
16 years ago
nomolos's avatar nomolos

If you want to have your {exp:structure:sub_nav} tag produce a subnav with a greater depth (in combination with the start=”” parameter, specifically. This may work without, but it’s untested), try the following (this involves hacking the core files). All these changes are in mod.structure.php, v. 1.2.6 (Backup your files in case you break something!):

Around line 460, add the following

// Allow greater depth
    $sub_nav_nested_depth = $TMPL->fetch_param('depth');
    $sub_nav_nested_depth = $sub_nav_nested_depth ? $sub_nav_nested_depth : 1;

This should be right after

$show_overview_link = $show_overview_link ? strtolower($show_overview_link) : "no";

Modify what is now line 528 (roughly) to be:

if ( ( ( $entry_data['depth'] - $current_node['depth'] ) > $sub_nav_nested_depth ) && $entry_data['parent_id'] != $current_node['id'] ) {

You can now use the depth=(n > 1) parameter in your {exp:structure:sub_nav} tag.

       
poThree's avatar
poThree
50 posts
16 years ago
poThree's avatar poThree

@saul thanks for the input. I looked at the sitemap tag and there just isn’t enough control over the classes. So I think I’m gonna avoid that for now.

@nomolos I didn’t try your suggesting however it is very intriguing and maybe I’ll have a use for it in a future project. But as this particular project stands, I’m thinking it’s probably most effiecient to hard code the main level nav at this point. It’s pretty likely to remain in it’s current state until a redesign or other major development in the future. I will dynamically build the sub nav though since that is likely to change on a much more regular basis.

I appreciate the input from both you guys. Thanks much!

       
Narzula's avatar
Narzula
69 posts
16 years ago
Narzula's avatar Narzula

Following up on my previous post (page 35) regarding Superfish menu implementation, the code below seems to be working well for a three-tier Nav item > Sub item > Sub-sub item navigation approach needed, using the Superfish menu system.

/* <ul> tag (+ vertical Superfish menu class) wrapped around hardcoded <li>s: */
<ul class="sf-menu sf-vertical">  

/* Hardcoded Nav item with <li> tags wrapped around Structure subnav tag*/
<li><a href="/index.php/about/">About</a> 
{exp:structure:nav_sub start_from="/about"} 
</li>

/* Repeat the previous as necessary */
<li><a href="/index.php/next-item/">Next Item</a>
{exp:structure:nav_sub start_from="/next-item"} 
</li>

</ul>

Pardon if this seems elementary but maybe it will help someone.

Also note that the Sitemap tag approach had seemed to work, until I ran into problems due to the lack of classes.

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

Thanks for all the code additions and examples, everyone. Nice work!

       
First 40 41 42 43 44 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.