jkersu

And your function is in BarMemberPage.php and not Page.php?

Justin White

@jkersu I do have a http://BarMemberPage.ss template, http://Navigation.ss is included in http://Page.ss and is inherited, by http://BarMemberPage.ss then http://FrontEndMemberConversion.ss is included in the http://BarMemberPage.ss template and http://Navigation.ss include

jkersu

I’m just having trouble understanding where you’re placing the includes. But I think @harvs1789uk is correct in saying that you need to pass the list as a variable into the include files.

jkersu

Ok @Justin White so I assume you have a http://BarMemberPage.ss template? So is the http://FrontEndMemberConversion.ss include and http://Navigation.ss include both directly inside that http://BarMemberPage.ss template? Or is http://Navigation.ss inside the http://FrontEndMemberConversion.ss include file?

harvs1789uk

The point of this part <% include FrontEndMemberConversion _BarMemberPositions=$BarMemberPositions %> being that, if I remember correctly, scope is lost when you move down into an Include but you can pass variables/context in (I just prefixed the passed down version with an _ for clarity)

Justin White

@jkersu There is BarMemberPage which has many DO’s which are BarMembers

harvs1789uk

Maybe something like:

http://Navigation.ss

  1. <% else_if $MenuTitle == "Members"%>
  2. <li class="$LinkingMode navItem hasChildMenu">
  3. $MenuTitle
  4. <% if $BarMemberPositions %>
  5. <% include FrontEndMemberConversion _BarMemberPositions=$BarMemberPositions %>
  6. <% end_with %>
  7. </li>
  8. <% end_if %>

http://FrontEndMemberConversion.ss

  1. <ul class="subMenuNav">
  2. <% loop $_BarMemberPositions %>
  3. <a href="/some/path/{$Title}">{$Title}</a>
  4. <% end_loop %>
  5. </ul>
jkersu

So your function getBarMemberPositions, what is the name of the page type?