1

I am pretty new to exsprexxion engine and want to ask a quistion i want to do this:

<ul class="touchcarousel-container">
  <li class="touchcarousel-item">
    <div class="rblock"> ITEM 1 </div> 
    <div class="balk_wit"></div>  
    <div class="rblock"> ITEM 2 </div>
  </li>  
  <li class="touchcarousel-item">   
    <div class="rblock"> ITEM 3 </div>  
    <div class="balk_wit"></div>  
    <div class="rblock"> ITEM 4 </div>
  </li>
</ul>

ENZ....

When I try it I only get all the entries in the upper part of the <li> (so they all come in the place of "ITEM 1"). Is there a way to count and display only the od ones and for the bottom <li> the od ones?

It would be nice if you can help me out.
Leon

Ok this is the code:

                <div class="rblock">
                {exp:channel:entries channel="track_record" dynamic="off"}
                {if count==1}
                     <div class="balk"><p>{title}</p></div>
                    {exp:ce_img:single img src="{track_record_picture}" alt="{title}" width="230" height="132" crop="y" allow_scale_larger="yes"}
                    <div class="text"><p>{track_record_description}</p></div>


                </div>



                <div class="balk_wit"></div>

                <div class="rblock">
                {if count==2}

                    <div class="balk"><p>{title}</p></div>
                    {exp:ce_img:single img src="{track_record_picture}" alt="{title}" width="230" height="132" crop="y" allow_scale_larger="yes"}
                    <div class="text"><p>{track_record_description}</p></div>
                    {/exp:channel:entries}
                </div>
                {/if}
            </li>
5
  • You need to show us your current EE template code, not just what you want as the output. Nov 8, 2013 at 12:18
  • Please show us more of what you currently have in your code. Do you have any EE tags {exp:channel:entries ...} for example? Nov 8, 2013 at 12:32
  • I have submited it in the post. thnx for the tip! Nov 8, 2013 at 12:59
  • dynamic="off" should be dynamic="no" though I don't think that will cure your problem completely... Also, unless I'm mistaken, your second if should either close the first if then open the second one, or the second one should be an {if:elseif} Nov 8, 2013 at 13:02
  • thanx it's indeed dynamic="no" but the other thing with the if statement didn't work out is is still just showing 1 entrie Nov 8, 2013 at 13:10

1 Answer 1

2

The most simples way for this is used switch tag

<ul class="touchcarousel-container">
                {exp:channel:entries channel="track_record" dynamic="off"}
                    {switch='<li class="touchcarousel-item">|'}
                    <div class="balk"><p>{title}</p></div>
                    {exp:ce_img:single img src="{track_record_picture}" alt="{title}" width="230" height="132" crop="y" allow_scale_larger="yes"}
                    <div class="text"><p>{track_record_description}</p></div>
                    {switch='<div class="balk_wit"></div>|</li>'}
                {/exp:channel:entries}
</ul>
1
  • This works out fine! thanx Max! Nov 8, 2013 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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