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.

Having a channel as a master channel

November 13, 2012 11:38am

Subscribe [2]
  • #1 / Nov 13, 2012 11:38am

    mikewatts

    6 posts

    Hi EEers

    I have a problem that I can’t quite get my head around and it may need a completely different solution to the one I’m endeavouring to find a solution to - any help would be greatly appreciated.

    I am building a website for a company that has a collection of malls, each mall could have the same shop, so lots of Gap stores for instance.

    In EE i have a stores channel and a malls channel I’m using Playa to relate the two so linking Gap to Mall A means that Mall A has Gap in it’s collection.

    I would like to have more than 1 Gap entry (in case Mall A Gap has a different sale or promo to Mall B Gap or a different image or whatever), that way I can change the two entries independently of one another. But I would like all Gap stores to feed from another master store channel where I can set the logo, the promos, the description and they would automatically feed to child store channel if they are not overridden by the child.

    Is this possible?

    I’ve tested with conditionals and thought this would work but many variations of XOR, ||, && nested and not didn’t work as it still flowed through to the next condition:

    {exp:channel:entries channel="store_template|stores" search:store_name="={embed:store_name}" disable="categories"}
        {!-- I would have expected the condition to show overriding child only but it shows the overriding child logo and the master logo--}    
        {if (channel == 'Stores' && logo) XOR (channel == 'Store template' && logo)}
            {logo wrap="image"}
        {/if}
    {/exp:channel:entries}

    I’m scratching my head on this one…

    Many thanks

    Mike

  • #2 / Nov 14, 2012 10:10am

    Boyink!

    5011 posts

    I haven’t thought it all the way through, but almost seems like you need a channel for ‘brands’ in addition to your current channels. You could then use Playa to relate all brand locations to a brand in addition to the mall they were part of.

  • #3 / Nov 15, 2012 11:00am

    mikewatts

    6 posts

    Thanks Michael

    That has helped immensely because I want to decouple everything as much as possible.

    I did get it to working as I outlined above using reverse_related_entries, but have now altered my scheme to use a brand channel which hadn’t occurred to me to do.

    Thanks for helping me out.

    Kind regards

    Mike

  • #4 / Nov 15, 2012 11:25am

    Boyink!

    5011 posts

    Cheers!

  • #5 / Nov 15, 2012 12:10pm

    Dan Decker

    7338 posts

    Hi Mike,

    Looks like Boyink! pointed you in the right direction.

    Is there anything else I can assist you with?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases