View more context

 

kinglozzer

If you had $has_one = ['Page' => BuilderPage::class]; it’d be $Page

lexandclo

Ok, so ive done <% loop $BuilderPage.Menu(1) %> <li class="nav-item"><a class="nav-link" href="$Link" title="$Title.XML">$MenuTitle.XML</a></li> <% end_loop %> and now it displays the li class, no links, title etc, and it only displays one when there are two pages?

kinglozzer

Oh it’s because Menu() is in the controller, not in Page

kinglozzer

How are you rendering the element, via an include?

lexandclo

So on the BuilderPage im <% loop Elements %> Then withinh the loop if the element matches a Type <% if Type = 'MainMenu' %> <% include MainMenu %> <% end_if %>

kinglozzer

So I think you could do <% include MainMenu CurrentPage=$Top %>, then inside your include use $http://CurrentPage.Menu(1)

kinglozzer

$Top gets reset inside an include, so you have to manually pass it in as another variable

Jay

There is an issue with viewing history on SS 4.4.4.

When I click to view a previous version it puts & in the url instead of a ?.

Is there a fix for this?