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.

nested switch and a plugin

December 08, 2011 11:03am

Subscribe [3]
  • #1 / Dec 08, 2011 11:03am

    Styx

    12 posts

    Hi,
    I have a structure as follows but couldnt manage to run it.
    The problem is when i put the extension or a field from the channel it doesnt work.
    when i take out the extension or a custom field it works.

    {exp:channel:entries channel="be" disable="categories|member_data|category_fields|pagination"}
    {switch="<div>|||"}

    {switch="{exp:ce_img:single src='{image}’ width=‘270’ height=‘230’}|{exp:ce_img:single src='{image}’ width=‘170’ height=‘100’}|{exp:ce_img:single src='{image}’ width=‘90’ height=‘70’} “}

    {switch="|||</div>"}
    {/exp:channel:entries}

    Btw, what i want to do is below, any better solutions are really wellcomed.


    <div>
    <div></div>
    <div></div>
    <div></div>
    </div>

    <div>
    <div></div>
    <div></div>
    <div></div>
    </div>
    .
    .
    .
    .
    .

  • #2 / Dec 08, 2011 11:20am

    glenndavisgroup

    436 posts

    Will this work:

    {exp:channel:entries channel=“be” disable=“categories|member_data|category_fields|pagination”}
    {switch=”<div>|||”}
    
    {exp:ce_img:single src=’{image}’ width=‘{switch="270|170|90"}’ height=‘{switch="230|100|70"}’}
    
    {switch=”|||</div>”}
    {/exp:channel:entries}

    Mike

  • #3 / Dec 08, 2011 11:25am

    Styx

    12 posts

    Will this work:

    {exp:channel:entries channel=“be” disable=“categories|member_data|category_fields|pagination”}
    {switch=”<div>|||”}
    
    {exp:ce_img:single src=’{image}’ width=‘{switch="270|170|90"}’ height=‘{switch="230|100|70"}’}
    
    {switch=”|||</div>”}
    {/exp:channel:entries}

    Mike


    mike thank you for your answer,
    but to make the question shorter i didnt include all markup
    in fact there are other html markup infront of the exp:img and also after that

  • #4 / Dec 08, 2011 12:00pm

    glenndavisgroup

    436 posts

    Can you post the html that goes in front and after?

  • #5 / Dec 08, 2011 1:00pm

    Styx

    12 posts

    Can you post the html that goes in front and after?

    Hi,
    They are a bunch of divs and other html markup that totally different from each other. Put anything you like as an example. And what i think the problem is, when i put the
    {exp:ce_img:single src=’{image}’ width=“200” height=“200”} line between switch tags it doesnt render, when i remove it it works fine.

    thank you very much.

  • #6 / Dec 08, 2011 1:10pm

    glenndavisgroup

    436 posts

    Sorry, I’m not familiar with add-on you are using but I’m trying to understand your structure and see if there is another way to make it work. Does the HTML before and after change based on which image size you are displaying as well or is it the same for all 3 different sizes?

  • #7 / Dec 08, 2011 1:23pm

    Styx

    12 posts

    Sorry, I’m not familiar with add-on you are using but I’m trying to understand your structure and see if there is another way to make it work. Does the HTML before and after change based on which image size you are displaying as well or is it the same for all 3 different sizes?

    Hi,
    Its different from each other, when i remove the plugin tag i dont have any problems to create the markup, it works.
    when put the plugin markup it doesnt render.
    Anyway thank you very much for your efforts.

     

  • #8 / Dec 08, 2011 8:18pm

    Sean C. Smith

    3818 posts

    instyx,

    Since the problem is with a third party add-on. I recommend that you contact the creator and see if they can help you out.

    Sean

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

ExpressionEngine News!

#eecms, #events, #releases