Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi everyone,
I'm working on a template to adapt it to Umbraco. I would like to toggle between three active days (it's about a congress schedule).
This is the code in the template:
@foreach (var date in dates) { <!-- Navigation by day start --> <ul class="nav nav-schedule"> <li class="active"><a href="#schedule2_day1" data-toggle="tab"><h5 class="highlight">@date.scheduleday</h5><p class="text-alt">@date.scheduledate</p></a></li> <li><a href="#schedule2_day2" data-toggle="tab"><h5 class="highlight">Day 2</h5><p class="text-alt">09/10/2016</p></a></li> <li><a href="#schedule2_day3" data-toggle="tab"><h5 class="highlight">Day 3</h5><p class="text-alt">10/10/2016</p></a></li> </ul> }
I have the data fields @date.scheduleday and @date.scheduledate. I have 3 days and dates.
Unfortunately I don't know, how to get just one line of tabs, with the first one being preselected and the other 2 selectable.
Does anyone know, how to do this?
Thanks in advance! Simeon
Hi Simeon
I think you need to do something along the lines of
<!-- Navigation by day start --> <ul class="nav nav-schedule"> @foreach (var date in dates) { string activeTab = date.IsFirst() ? "active" : string.Empty; <li class="@activeTab">##your date code here</li> } </ul>
I haven't added the exact code for the list items, but hopefully this will get you on the way.
Cheers
Nigel
Hi Nigel,
Thanks a lot, and please excuse my late reply!
I will try this...
Best, Simeon
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Templating: Toggle between tabs
Hi everyone,
I'm working on a template to adapt it to Umbraco. I would like to toggle between three active days (it's about a congress schedule).
This is the code in the template:
I have the data fields @date.scheduleday and @date.scheduledate. I have 3 days and dates.
Unfortunately I don't know, how to get just one line of tabs, with the first one being preselected and the other 2 selectable.
Does anyone know, how to do this?
Thanks in advance! Simeon
Hi Simeon
I think you need to do something along the lines of
I haven't added the exact code for the list items, but hopefully this will get you on the way.
Cheers
Nigel
Hi Nigel,
Thanks a lot, and please excuse my late reply!
I will try this...
Best, Simeon
is working on a reply...