Navigation - I only want to display the first 12 links
Hello,
I'm fairly new to Umbraco still and XLST for that matter. I have the main navigation working fine, the side navigation also works fine. However, I am trying to display only part of the list for the navigation and I'm not sure how to do this.
More detail:
We have a special "item of the month" and we want only 12 months to be displayed, so since it is March now, we don't need January and February displayed. The navigation is in an UL as listed items.
I don't think I want a substring code since the exact characters will change depending on the month... but I'm not exactly sure where I should start or if anyone has ideas? Right now I have this displayed:
February 2011
January 2011
December 2010
Novermber 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
I want to have it so it knocks off the last 2 on the list each time. So based on the current list, I would want Feb. 2010 and Jan. 2010 to fall off the list and when we add March 2011, I would want March 2010 to fall off the list and so on.
Navigation - I only want to display the first 12 links
Hello,
I'm fairly new to Umbraco still and XLST for that matter. I have the main navigation working fine, the side navigation also works fine. However, I am trying to display only part of the list for the navigation and I'm not sure how to do this.
More detail:
We have a special "item of the month" and we want only 12 months to be displayed, so since it is March now, we don't need January and February displayed. The navigation is in an UL as listed items.
I don't think I want a substring code since the exact characters will change depending on the month... but I'm not exactly sure where I should start or if anyone has ideas? Right now I have this displayed:
I want to have it so it knocks off the last 2 on the list each time. So based on the current list, I would want Feb. 2010 and Jan. 2010 to fall off the list and when we add March 2011, I would want March 2010 to fall off the list and so on.
Any ideas on the subject? Thanks in advanced!
Hi,
One way to achieve this is using the position() function, you can add it to your for-each selector or inside the loop, ex:
or
Hope this helps,
Tom
is working on a reply...