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.

Is it possible to display parent title in channel entry

April 09, 2012 4:10pm

Subscribe [1]
  • #1 / Apr 09, 2012 4:10pm

    nhinshaw

    13 posts

    Hi everyone, I have an issue I am wrestling with. I have section of a website that is broken down into products group by product lines. In another section of the site I pull in product documentation related to those products

    {exp:channel:entries channel="products_detail" disable="categories|member_data|pagination" dynamic="no" sort="asc"}
        <li>
         {title}
         <ul>
           {offline_product_documentation}
           <li>
            <a href="http://{offline_file_upload}">{product_number}</a>
           </li>
           {/offline_product_documentation}
         </ul>  
         <ul>
          {online_product_documentation}
          <li>
           <a href="http://{online_file_upload}">{online_product_number}</a><br> 
          </li>
          {/online_product_documentation}
         </ul>
        </li>
        {/exp:channel:entries}

    I am wondering if there is a way to display the parent product that each is grouped under. This visualization might help:
    - Product Line A
    - - Product 1
    >>>>Product Document
    >>>>Product Document
    >>>>Product Document
    >>>>Product Document

    - - Product 2
    >>>>Product Document
    >>>>Product Document

    - - Product 3
    >>>>Product Document

    Product 1, 2 and 3 each have their own entry. I would like to pull in all of the docs grouped under Product Line and then Product name. Everything is working save for the Product Line being output on the page.

    Is this possible? Please let me know if I can clarify any part of this.

    Thanks,
    Nathan

  • #2 / Apr 10, 2012 12:19pm

    Dan Decker

    7338 posts

    Hi nhinshaw,

    It sounds like you want use ExpressionEngine Relationships.

    With Relationships, you identify a field in one Channel as a relationship field type. You select the Channel that you want to “relate to”.

    When you create or edit an entry in the first channel, you choose from a list of entries in the second channel. Those 2 entries are now “related”.

    Read over the User Guide on Relationships. I’ll be happy to answer any new questions you might have!

    I look forward to your reply!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases