ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Troubles with nested loops

August 27, 2010 11:48am

Subscribe [2]
  • #1 / Aug 27, 2010 11:48am

    lavagraphics

    2 posts

    I’m trying to load a product channel based on the url-title, but this doesn’t seem to work.
    I nest an image loop inside the channel loops, that works fine.
    But I do want to list another channel as well, could someone look into this?

    Thanks

    FIRST PART

    {exp:channel:entries}
    {body}
         
    <!-- LOOP TROUGH IMAGES -->
    
    {exp:channel_images:images entry_id="{entry_id}" limit="12" orderby="random"}
    <div class="thumb" id="thumb-{image:count}"><a href="http://{image:url:large}">" title="" alt=""]{image:url:small}</a></div>
    {/exp:channel_images:images}
    
    {/exp:channel:entries}

    SECOND PART
    Needs to be integrated in the first part cause I need the {url_title}

    {exp:channel:entries channel="products-{url_title}" dynamic="off"}
    <div class="excerpt {switch="odd|even"}">
    <h2>{title}</h2>
    <p>    {if product-afbeelding}<br />
            {product-afbeelding}<br />
        {/if}<br />
        {product-body}<br />
    </div><br />
    {/exp:channel:entries}

  • #2 / Aug 27, 2010 5:48pm

    Sue Crocker

    26054 posts

    Welcome to the ExpressionEngine forums, lavagraphics!

    Can we get a bit more information from you? Which version/build of EE2.x are you using? You can find that at the bottom of any control panel page.

    What exactly are you trying to accomplish? Normally you don’t nest exp:channel:entries tags.

  • #3 / Aug 28, 2010 5:04am

    lavagraphics

    2 posts

    Thanks for the reply

    I started to rethink my concept of nested channels (EE newbie). And now I use the url segment to accomplish what I need.
    This post can be closed for me 😊

    Regards

  • #4 / Aug 28, 2010 5:30am

    Sue Crocker

    26054 posts

    Glad you were able to figure out what the problem was. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases