Menus in Internet Explorer

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
cactusg
New Member
New Member
Posts: 8
Joined: Sun Apr 05, 2009 1:08 pm

Menus in Internet Explorer

Post by cactusg »

Hi, If I am posting in the wrong place please can somebody redirect me?

I am using CMSMS version 1.4 "Jamaica". I have built a menu - with some help, and it looks just how I want it to in Firefox but is a total mess in Internet Explorer.

Here is the link to the site…

http://www.wdbuild.com/daviesflowershop/

And here is the menu template so far…

{* CSS classes used in this template:
#menu_wrapper - The id for the that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the
.menuparent - The class for each that has children.
.menuactive - The class for each that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}


{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}

{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}

{repeat string="" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
type == 'sectionheader'}
        {$node->menutext}
{elseif $node->type == 'separator'}
       
{else}
type != 'sectionheader' and $node->type != 'separator'}
href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}>{$node->hierarchy}: {$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->hierarchy}: {$node->menutext}-->
{/if}

{/foreach}

{repeat string="" times=$node->depth-1}



{/if}

I'm very confused. Please could somebody advise me?
uniqu3

Re: Menus in Internet Explorer

Post by uniqu3 »

Hi,

quick view at the menu template results in error by commenting out the , thats why IE displays -->
If you use the accesibility stylesheet included in CMSMS you dont need to comment it out.

I would also advise you to check some of the validation errors
http://validator.w3.org/check?verbose=1 ... wershop%2F
Last edited by uniqu3 on Sun Apr 05, 2009 2:31 pm, edited 1 time in total.
cactusg
New Member
New Member
Posts: 8
Joined: Sun Apr 05, 2009 1:08 pm

Re: Menus in Internet Explorer

Post by cactusg »

That's excellent, thank you, the --> have gone now but why are my headings repeating themselves?

The validation report is a little confusing to me too. It mentions items from my menu that i inputted as section headers using CMSMS and not coded myself at all.
Last edited by cactusg on Sun Apr 05, 2009 3:12 pm, edited 1 time in total.
uniqu3

Re: Menus in Internet Explorer

Post by uniqu3 »

The repeating Headings are being caused by {$node->menutext}

W3C:
iLine 28, Column 48: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified

Code: Select all

<div id=bread><span class="lastitem">Home</span>
shold be

Code: Select all

 <div id="bread"><span class="lastitem">Home</span>
Line 29, Column 48: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified

Code: Select all

<div id=search_for><form id="cntnt01moduleform_1"
should be

Code: Select all

<div id="search_for"><form id="cntnt01moduleform_1"
Line 47, Column 27: end tag for element "a" which is not open

Code: Select all

<dfn>2: </dfn>Occasions</a>
is caused by

Code: Select all

<dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
the link is being closed but in the

Code: Select all

elseif $node->type == 'sectionheader'}
        <li class="sectionheader"><span> {$node->menutext} </span>
{elseif $node->type == 'separator'}
there is no <a href...
cactusg
New Member
New Member
Posts: 8
Joined: Sun Apr 05, 2009 1:08 pm

Re: Menus in Internet Explorer

Post by cactusg »

Thank you for all of your help so far and please excuse my ignorance. I can follow your advice up to a point and have made the relevant amendments but I am at a loss as to where to place my a href and how to place it correctly.
uniqu3

Re: Menus in Internet Explorer

Post by uniqu3 »

I think this should solve the problem

Code: Select all

><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
Looks like you deleted > when you tried to comment it ou so its missing where it starts

Code: Select all

{else}
	<li><a 
{/if}
cactusg
New Member
New Member
Posts: 8
Joined: Sun Apr 05, 2009 1:08 pm

Re: Menus in Internet Explorer

Post by cactusg »

when i close the my menu goes crazy, turning all of the menu items into lots of scrunched up urls. The menu does appear to look okay though without closing the <a . Although it does still appear as an error on the validation.
uniqu3

Re: Menus in Internet Explorer

Post by uniqu3 »

you shouldnt close it where you see the so make it simply >
cactusg
New Member
New Member
Posts: 8
Joined: Sun Apr 05, 2009 1:08 pm

Re: Menus in Internet Explorer

Post by cactusg »

Thank you
Post Reply

Return to “Developers Discussion”