Conditional in Wrapper

Options

I'm in a small pickle and I wanted to know if you could please help me out here. What I'm trying to do is this: I have a in a wrapper a ] call within the "Additional attributes for the BODY tag" that looks like this: class="]".

Now my confusion is this. I would like to have within my wrapper HTML a conditional that says if the body_class being called in is "X" then show this logo ELSE show this logo. I don't know how to structure that Convio code to check against the body_class.

Please any help will do. I was thinking maybe something like this:

]::

LOGO1

::

]]

Now do I use ]?

Tagged:

Comments

  • First I should say, it seems a little odd to use an S51 include call for a class name. Unless your code is being rendered correctly.

    Actually I was a little surprised it worked at all even, but I just tried it and it did work (I think I may have only tried the tag versions).

    In any case, I doubt that there is a solution for you as you have it now. I don't think Convio gives you any hooks into the HTML of a wrapper. Plus the two pieces (the s tag and the conditional) are most likely processed at the same time - so the class wouldn't actually even be there for the conditional to know about (otherwise it would have to keep a running tally of what the HTML looked like thus far, which seems unlikely).

    So if I could back up and ask you how the body class relates to the logo?

    If your additional attributes is always going to be using that one include, the class will always be the same for that wrapper. In other words, how within the wrapper is the body class changing, and can't you use the same mechanism to change the logo?

    Or if that question makes no sense, what exactly is the broader thing you trying to accomplish, technical details aside?

  • Adrian Cotter:

    First I should say, it seems a little odd to use an S51 include call for a class name. Unless your code is being rendered correctly.

    Actually I was a little surprised it worked at all even, but I just tried it and it did work (I think I may have only tried the tag versions).

    In any case, I doubt that there is a solution for you as you have it now. I don't think Convio gives you any hooks into the HTML of a wrapper. Plus the two pieces (the s tag and the conditional) are most likely processed at the same time - so the class wouldn't actually even be there for the conditional to know about (otherwise it would have to keep a running tally of what the HTML looked like thus far, which seems unlikely).

    So if I could back up and ask you how the body class relates to the logo?

    If your additional attributes is always going to be using that one include, the class will always be the same for that wrapper. In other words, how within the wrapper is the body class changing, and can't you use the same mechanism to change the logo?

    Or if that question makes no sense, what exactly is the broader thing you trying to accomplish, technical details aside?

    Adrian,

    Thank you for your reply. Since i posted that yesterday I have come up with a solution that was not the most streamlined but it works. If your interested in what I have put together feel free to email me. guys thanks and have a good day.

Categories