Hi,
I have created a progressbar that is ontop of an entity form. The entity form is devided into tabs and each tab has a seperate page. On each web page i have a web template with this code to make a progress bar :
{% assign depth_offset = depth_offset | default: 1 %}
{% assign current_page = current_page | default: page %}
{% assign current_depth = 0 %}
{% assign leaf_page = false %}
<div class="progressbar-wrapper-application">
<ul class="progressbar-application">
{% capture page_item %}
<li class="active">
<a href={{ current_page.url | h }} title={{ current_page.title | h }}>
{{ current_page.title | h }}
</a>
</li>
{% endcapture %}
{% assign crumb_count = 0 %}
{% assign leaf_mode = false %}
{% for sibling in current_page.parent.children %}
{% if sibling.url == current_page.url %}
{{ page_item }}
{% else %}
<li>
<a href="{{ sibling.url | h }}" title={{ sibling.title | h }}>
{{ sibling.title | h }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div><div> <div><span>The question is now <div>1. How do i know if it is the previous or next sibling child. The reason is that i want to style the previous and next items.<div>2. Second question is, if the page has been visited i want the links to be active, if they are not, then they should be dissabled. How do i solve this ?<div> <div>W. </div></div></div></div></span></div></div>

Report
All responses (
Answers (