I’m getting an validation error on this page.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
May 31, 2010 10:21am
Subscribe [3]#1 / May 31, 2010 10:21am
I’m getting an validation error on this page.
#2 / May 31, 2010 10:31am
Greg8033, this has nothing to do with EE. It has to do with you using id=“webDesign” twice on the page.
#3 / May 31, 2010 10:50am
Ok let me ask this….
I am currently using this for my menu bar;
<body {if embed:body_id} id="{embed:body_id}"
{if:elseif segment_1} id="{segment_1}"
{if:else} id="home" {/if} class="screen">to work with my body id. This is why id=“webDesign” is appearing twice on the page.
How can I get the same results with out id=“webDesign” appearing twice on the page? Thanks
#4 / May 31, 2010 3:46pm
If you are using advanced conditionals you must not use the deprecated short form of {if foo}. Try this:
<body {if embed:body_id != ""} id="{embed:body_id}"
{if:elseif segment_1 != ""} id="{segment_1}"
{if:else} id="home" {/if} class="screen">#5 / May 31, 2010 4:53pm
I replaced my original code
<body {if embed:body_id} id="{embed:body_id}" {if:elseif segment_1} id="{segment_1}" {if:else} id="home" {/if} class="screen">with the code in the last reply
<body {if embed:body_id != ""} id="{embed:body_id}" {if:elseif segment_1 != ""} id="{segment_1}" {if:else} id="home" {/if} class="screen">But the id=“webDesign” is still coming up twice.
#6 / May 31, 2010 5:00pm
You’ll need to do some reduction testing, I am afraid. Try to reduce your conditional to keep it as simple as possible. Perhaps start with simple ones:
{if embed:body_id != ""}{embed:body_id}{/if}
{if embed:body_id == "" && segment_1 != ""}{segment_1}{/if}Take it from there. It’s in all probability an issue with your conditional.