Increment
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Pv Ledoux
Increment Number?
General
Adeeb Khan
|
Posted: 27 September 2014 05:58 PM |
|
|
|
Hello Hello :)
I came across this awesome add-on but am having a strange problem getting it to work.
<!-- Setup Increment --> {exp:pvl_increment start="0" step="1"}
<!-- Mobile Only Footer --> <div class="show-for-small-only"> {exp:low_variables:pair var="lv_l_navigation"}
{if display == "footer" && device == "mobile" && link!=""} {if {exp:pvl_increment increment="no" random} == 0} do this... {if:else} {exp:pvl_increment random} {/if} {/if}
{/exp:low_variables:pair}
The above output’s first result is a 7 which matches the row sequence with Matrix. Shouldn’t the first number be 1?
Really hoping to get a solution to this, seems like such an awesome and much needed add-on without me having to use PHP.
Thanks,
Adeeb
|
|
|
pvledoux
|
Posted: 30 September 2014 10:17 AM |
# 1
|
|
Developer
|
Hi Adeeb,
sorry for the delay. I think that you have a parsing order issue. The last pvl_increment is executed in any cases, even before your first condition. This is probably due to the fact that you are nesting the conditions.
Maybe you should try IfElse (https://github.com/croxton/Ifelse) to wrap your conditions.
I hope it will help.
Best regards,
Pv
|
|
|
Adeeb Khan
|
Posted: 01 October 2014 05:28 AM |
# 2
|
|
|
Great wonderful.
I’ll give it a try and will let you know how I get on.
Thanks,
Adeeb
|
|
|