|Template $FirstLast||Isengrim||9/19/12 6:40 AM|
I have found a little weird problem.
In SS templates by using loops I can use the Function $FirstLast.
Direct in the loop this funktion shows the right list position for the first or last item.
But when i use an include and call in the included template the funktion $FirstLast it returns in every item 'first last'
Here the example:
<% loop Menu(2) %>
<% include MenuItem %>
<% end_loop %>
<li class="$FirstLast"><a href="$Link">$Title.XML</a></li>
Anybody else with the same problem?
|Re: [silverstripe-dev] Template $FirstLast||anselmdk||9/19/12 10:23 AM|
I was wondering about this too today.
It seems includes work a little different in SS3. See the includes section here:
You can now define variables in your include files like this:
I think this is one of the very great new features in SS3, once you've gotten used to it you'll need far less include files.
|Re: [silverstripe-dev] Template $FirstLast||Isengrim||9/19/12 10:30 AM|
Ahh I see I see.
Good to know.
I think that this is a greate feature, too.
Thank you for your response.