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

rick.prince's avatar
rick.prince
111 posts
16 years ago
rick.prince's avatar rick.prince

In previous versions of structure the code below worked as expected. Now (or a couple of versions ago), the if statement isn’t returning as true even when the current node is a parent.

{if '{exp:structure:nav_sub}' != ""}
<div>
<h5>{exp:weblog:entries status="open|footer_nav" url_title="{segment_1}" dynamic="off"}{title}{/exp:weblog:entries}</h5>
{exp:structure:nav_sub}
</div>
{/if}

The above is embedded from another template if that makes a difference?

Structure Ver 1.2.6 ExpressionEngine 1.6.7 Build: 20090320

Any thoughts?

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

@Bill McGrath depth and limit_depth parameters are almost ready and will probably be released this week

@rick.prince we’ll test this week also, this should still work and we’ll try to see what’s up

       
Bill McGrath's avatar
Bill McGrath
6 posts
16 years ago
Bill McGrath's avatar Bill McGrath

@rockthenroll Thanks for the quick reply! Looking forward to implementing the new features 😊 Best. Addon. Ever.

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

New version 1.2.7

• {exp:structure:nav_sub} new parameter “limit_depth” • {exp:structure:nav_sub} new parameter “show_depth” • {exp:structure:nav_sub} new parameter “css_id” • {exp:structure:nav_sub} new parameter “css_class” • Code refactoring

http://www.ngenworks.com/software/ee/structure

UPGRADE NOTICE: Unfortunately, the conditional statement that previously worked to check if a page has children will not work with these new parameters. You’ll have to use an additional template or conditional to remove the nav_sub tag completely if a page uses this.

       
Bill McGrath's avatar
Bill McGrath
6 posts
16 years ago
Bill McGrath's avatar Bill McGrath

@rockthenroll, Thanks for the new update!

However the functionality I am trying to create doesn’t seem possible at this time unless I hard code it.

I have sub nav like so:

Test 1 - Test 1.1 - Test 1.2

Test 2 - Test 2.1

Test 3

Test 4 - Test 4.1

Is there a way to generate the entire sub navigation html automatically no matter what page I am on?

For instance, I am on 2.1 yet it will still generate the child nav items for 4 and 1?

Thanks for your time!

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

I’m not sure a single tag will do what you’re looking for. You would have to use segment checking to conditionally display which children you want there.

       
Bill McGrath's avatar
Bill McGrath
6 posts
16 years ago
Bill McGrath's avatar Bill McGrath

@rockthenroll, Thanks for the quick reply.. Unfortunately I am using this on several areas of the site and its multilingual.. I don’t want to hard code it with multiple segment checks as the client may go to town and change/edit/remove pages which could break that functionality

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

@Bill McGrath check your PMs for more explaination

       
mirkob's avatar
mirkob
74 posts
16 years ago
mirkob's avatar mirkob

@rockthenroll I just noticed you lowered the requirement of the php version.

I can finally play with this module! Cool!

       
ITK Design's avatar
ITK Design
5 posts
16 years ago
ITK Design's avatar ITK Design

Structure Module and Comments:

Is there a way to make EE comments - exp:comment:entries and exp:comment:form - work with structure urls? In my current setup the comment tags only output when the title_url and structure uris are the same.

    • -

A sidenote: The new 1.2.7 structure module is a huge win 😊 Now it’s suddenly possible to make complete dropdown menues (that validates).

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

@Jesper Wøldiche not sure this would work without some hacking. I generally switch back to the normal template engine when I’ve needed comments so that functionality works the same as it does out of the box. That way, the client has a simple updating interface, but the “detail” page of the post goes to a template_group/template URL.

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

I just upgraded from 1.1.1 to 1.2.7. I couldn’t find any upgrade instructions so I literally just renamed my old files and uploaded the new ones - I didn’t turn off the module or extension before I did this. After that I couldn’t get to the extension page, and the formatting/styling of the structure module page is missing. I tried removing the structure related entries from exp_extensions, but that didn’t affect my ability to get into the extension page in the CP.

I’m in the process of reverting the files and DB back to before the attempted update.

What’s the recommended process for upgrading? Did do it wrong, or screw something up while doing it correctly?

Thanks!

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

I reverted back and tried again. I turned off the extension before upgrading this time and that fixed the issue with the extension page. The CSS and images aren’t being found for the module page though - somehow I’ve got them in the wrong position I guess?

But the actual problem (the reason I was updating in the first place) still remains unfortunately. When I create a new top level page I can’t seem to get to it using a structure generated URL. I can get to it using site.com/template_group/# and I see the page correctly. So if I make the page test, I can’t go to site.com/test, but I can go to site.com/page/117 and get to the page. This only applies to top-level pages - if I create a page with a parent then it works like it should.

Thanks in advance,

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

@Brian M. there’s now a folder called “themes” in the Structure download and the folder inside that needs to go INSIDE /themes/cp_themes/default or whatever your current CP theme is. Check your PMs for the other issue…

       
Jason Morehead's avatar
Jason Morehead
454 posts
16 years ago
Jason Morehead's avatar Jason Morehead

I just upgraded to v1.2.7 and I’m really impressed with the new features, especially the new features for the “{exp:structure:nav_sub}” tag. However, I’ve run into scenario and I’m trying to figure out a workaround.

I’ve got a site in development – sorry, can’t give out the URL right now – that has an event calendar on it. If you go to the main event calendar URL, then the “{exp:structure:nav_sub}” tag highlights the correct option. In other words, if you go to http://domain.com/news-events/calendar/, then the “{exp:structure:nav_sub}” tag creates the following code:

<ul id="nav-sub">
    <li><a href="/news-events/announcements/">Announcements</a></li>
    <li class="here"><a href="/news-events/calendar/">Events & Program Calendar</a></li>
    <li><a href="/news-events/e-newsletter/">E-Newsletter</a></li>
    <li class="last"><a href="/news-events/archive/">News Archive</a></li>
</ul>

However, if go to one of the day views of the calendar, for which the URL looks like http://domain.com/news-events/calendar/day/2009/05/29/, then the “{exp:structure:nav_sub}” tag creates the following code:

<ul id="nav-sub">
    <li><a href="/news-events/announcements/">Announcements</a></li>
    <li><a href="/news-events/calendar/">Events & Program Calendar</a></li>
    <li><a href="/news-events/e-newsletter/">E-Newsletter</a></li>
    <li class="last"><a href="/news-events/archive/">News Archive</a></li>
</ul>

You’ll see that the “here” class is no longer being applied to the LI tag for the Events & Program Calendar. So on that page, “Events & Program Calendar” is no longer highlighted, even though you really are still in the “Events & Program Calendar” section.

Is there some way, other than hard-coding the entire menu based upon the URL segments – which I’ve done before – that I can force Structure to apply the “here” class to a specific LI tag based upon URL segments, URI, etc.?

       
First 42 43 44 45 46 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.