2

updated with EE and Structure Version

EE 2.7.2 Structure 3.3.4

I'm building a site with structure and for each section of the site the child pages will be in the side bar so that if I'm on domain.com/about In the sidebar I will see:

About (h4 tag)

--sub page

--sub page

--sub page

However with the code (below) I"m using it output all entries for the entire site. Please advise.

{exp:structure:nav 
    css_class="side_navigation"
    start_from="/{segment_1}"
}

What I end up with however is

About

-- subpage

-- subpage

-- subpate

Services

-- subpage

-- subpage

etc...

  • which version of EE & Structure? – Steven Grant Dec 9 '13 at 21:53
  • May be too obvious, but is there a value in the URL for segment_1? – dbigca Dec 10 '13 at 0:49
  • dbigca - yes there is. Steven - EE 2.7.2 Structure 3.3.4 – CreateSean Dec 10 '13 at 14:45
1

I just resolved this, turns out it was a low variables/parse order issue. I needed to preparse segment_1 etc... on the main template. My code now looks like this

    {!--sidebar--}
    {exp:low_variables:single var="lv-sidebar"
      preparse:pre_seg_1="{segment_1}"
      preparse:pre_seg_2="{segment_2}"
      preparse:pre_seg_3="{segment_3}"
      preparse:pre_top_title="{structure:top:title}"
    }

And then in the Low Variable I have this:

<h4>{pre_top_title}</h4>

{if structure:child_ids != ''}
    {exp:structure:nav 
        css_class="side_navigation"
        start_from="/{pre_seg_1}"
    }
{/if}

Now weverything works just fine

| improve this answer | |
0

Why don't you use the last version of Structure? 3.3.13 It seems that in version 3.3.12 a update was made for Nav tag output bug for ee 2.7

Francois

| improve this answer | |
  • Worfoual, 3.3.13 is listed on devotee as the latest version, yet the version, I freshly installed last week for structure is 3.3.4 (higher number) so I'm not sure why that is or what would happen if I overwrote the existing higher version with the devotee downloaded version. – CreateSean Dec 10 '13 at 15:34
  • 3.3.13 is higher than 3.3.4 If you download 3.3.13 you will also get information about updating, you can find it also here: buildwithstructure.com/documentation/upgrading – worfoual Dec 10 '13 at 16:01
  • OKay - upgraded to 3.3.13 but the side nav is still not respecting the start from parameter. – CreateSean Dec 10 '13 at 19:30
  • did you run update? – worfoual Dec 11 '13 at 7:52
  • yes, that was the first thing I did after uploading the files. – CreateSean Dec 11 '13 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.