5

I have the code above in a DWT and what I need is to put in the "X" the number of elements that I have. So the final TemplateRepeatIndex + 1 and it should be in the DWT if it is possible.

Does anyone have an idea?

Thanks in advance.

<ul data-orbit="" class="adapt-story-slider orbit-slides-container" style="height: 521px;">
<!-- TemplateBeginRepeat name="Component.Fields.decoratedGames" -->
    <li data-orbit-slide="headline-@@TemplateRepeatIndex@@" 
    </li>
<!-- TemplateEndRepeat -->
</ul>

<div class="orbit-slide-number">
  <span>1</span> of <span> **X** </span>
</div>
7

I think the best way to do it is to add a C# Fragment or .NET TBB to calculate the number of elements you will be rendering in your DWT and push it in a Package Variable so that you can access it.

<div class="orbit-slide-number">
  <span>1</span> of <span> @@NumberOfElements@@ </span>
</div>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.