I'm using group by group. I do have index and backwards navigation enabled.
I did something really quick and dirty (which works by just reading the currently disabled move command out of the index dropdown:
Code:
// Get current page
$('header ul.dropdown-menu li.index-item a').each(function(){
if ($(this).hasClass('disabled')){
var myHref = $(this).attr('href');
var pagenum = Number(myHref.split("=")[1].trim())
console.log(pagenum);
}
});
I can work with that. What did I do, I did hack a nav menu into the outerframe.twig
It just displays the groups which end with "#" in their grouplabel
Code:
<!-- outer frame container -->
<div class="{{ aSurveyInfo.class.outerframe }} container-fluid"
id="{{ aSurveyInfo.id.outerframe }}" {{ aSurveyInfo.attr.outerframe }} >
<div class="row">
<div class="col-left col-xl-2">
{% if (aSurveyInfo.aQuestionIndex.bShow == true) %}
{% if (not aSurveyInfo.popupPreview) and aNavigator.aMoveNext.value == "movesubmit" %}
{# Do nothing - this exists as a bugfix to hide Navigator on fake lastpage #}
{% else %}
<div id="customNavMenu" class="row space-col list-group">
<div class ="list-group-item sidenavborder"><b>Navigationsmenü</b></div>
{% for step, indexItem in aSurveyInfo.aQuestionIndex.items %}
{% if '#' in indexItem.text %}
{% set statusClass = '' %}
{% if attribute(indexItem.stepStatus, 'index-item-unanswered') is defined and attribute(indexItem.stepStatus, 'index-item-unanswered') == true %}
{% set statusClass = statusClass ~ ' index-warning' %}
{% endif %}
{% if attribute(indexItem.stepStatus, 'index-item-error') is defined and attribute(indexItem.stepStatus, 'index-item-error') == true %}
{% set statusClass = statusClass ~ ' index-danger' %}
{% endif %}
{% if attribute(indexItem.stepStatus, 'index-item-current') is defined and attribute(indexItem.stepStatus, 'index-item-current') == true %}
{% set statusClass = statusClass ~ ' disabled' %}
{% endif %}
<div class="list-group-item sidenavborder {{ indexItem.coreClass }}">
<a href='{{ indexItem.url }}' data-limesurvey-submit='{{ indexItem.submit }}'
class='dropdown-item sidenav {{ statusClass }}'>
{{ indexItem.text|split('#')[0] }}
</a>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endif %}
</div>
<div class="col-left col-xl-8">
{# Which file to include for content is decided inside the layout #}
{% include './subviews/content/mainrow.twig' with {'include_content': include_content } %}
</div>
</div>
</div>