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.

Related Entries and Permalinks

July 26, 2009 10:54pm

Subscribe [2]
  • #1 / Jul 26, 2009 10:54pm

    DoubleC335

    26 posts

    I can’t seem to figure out how to generate the correct URLs to my related entries. The problem is all my related entries are being formed with the same template group/template, and I need to have them use different ones. I can’t figure out if I need some kind of conditional or how to tackle it. Here’s what I have so far: 

    {exp:weblog:entries weblog="products"  foxee_active="yes" limit="1"  status="Piano" disable="trackbacks|pagination|member_data"}    
    {related_entries id="related_products"}
    
                 {if count == "1"}<table class="related_products clear_left" border="0" cellpadding="0" cellspacing="0">{/if}
    
                <tr><td class="product_image"><a href="http://{title_permalink=">{product_thumbnail}</a></td>
                <td class="product_title"><a href="http://{title_permalink=">{title} __                {if foxee_is_on_sale}_                            ({foxee_saleprice})_                        {if:else}_                         ({foxee_price}) _                                    {/if}_                        </a></td></tr>
               {if count == total_results}</table>{/if}     
    {/related_entries}    
     {/exp:weblog:entries}

    What I need is to form a link to one product with an URL of recordings/mp3/title, and another with an URL of combo/book/title. If you want to see a more concrete example, you can view a test page here.

  • #2 / Jul 28, 2009 2:11am

    Michael Hahn

    316 posts

    just looked at your link and it looks like you fixed it, but the first thing I noticed was this:

    <a href="{title_permalink=">
  • #3 / Jul 28, 2009 10:41am

    DoubleC335

    26 posts

    Yeah, I caught that. Thanks.

    But any ideas on how to code it so I can form the right path to the links dynamically?

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

ExpressionEngine News!

#eecms, #events, #releases