Menu template just <a href="#">Home</a>

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Maarten
Forum Members
Forum Members
Posts: 84
Joined: Sat May 06, 2006 9:52 am

Menu template just <a href="#">Home</a>

Post by Maarten »

Hi,

I'm trying to make a menu that puts the tags like Home, but the standard menu templates give Home

My design doesn't work good with the ul/li tags, I've looked in the menu templates, but I wouldn't now how to change them to get the right result. I tried the standard menutemplates but the do not do that.

Hope you can help me (and understand what I mean ;)!

Thanks in advance
Maarten
hotaru
Forum Members
Forum Members
Posts: 79
Joined: Mon Apr 17, 2006 5:38 pm

Re: Menu template just <a href="#">Home</a>

Post by hotaru »

Hi Maarten -

Why do you want to get rid of the unordered list? I think it helps with accessability issues.

If you just want a more simple appearance on the page, you might find that it's better to leave it in and format the stylesheets the way you want. There are lots of very nice people here who can help with that.  :)

-- Genevieve
Maarten
Forum Members
Forum Members
Posts: 84
Joined: Sat May 06, 2006 9:52 am

Re: Menu template just <a href="#">Home</a>

Post by Maarten »

Hotaru thanks for your reply. I want this because it's an one level menu only: Home, news, contact etc.
I could rebuild my css, but I thought this could be easier. Il'see if I can format the css that way, and if I can't I'll post it here, thank you!
badger

Re: Menu template just <a href="#">Home</a>

Post by badger »

I copied one of the tpl files in the menu manager, and stripped out all the stuff.

I needed to do that since the theme I was porting (Andreas07) needed A tags for the menu, and like you it would be WAY too hard to figure out the CSS.

Here is the TPL code

Code: Select all

{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *} 
{if $count > 0}
 {foreach from=$nodelist item=node}
  {if $node->depth > $node->prevdepth}
	{repeat string="" times=$node->depth-$node->prevdepth}
  {elseif $node->depth < $node->prevdepth}
	{repeat string="" times=$node->prevdepth-$node->depth}
  {elseif $node->index > 0}
 {/if}

{if $node->current == true}
<a href="{$node->url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
<hr class="separator" />
{else}
<a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>{/if}
{/foreach}

{repeat string="" times=$node->depth-1}
{/if}
Hope that helps.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu template just <a href="#">Home</a>

Post by Dr.CSS »

this is using bullet menu, if you have no section headers it will show up just like you want.... the section headers in this are colored black so you will see the diff. and they do nothing when you hover them ....

http://www.multiintech.com/index.php?page=andreas07

    mark

BTW: it uses the stuff
Maarten
Forum Members
Forum Members
Posts: 84
Joined: Sat May 06, 2006 9:52 am

Re: Menu template just <a href="#">Home</a>

Post by Maarten »

Badger thank you so much. I was busy trying to figure out how to rebuild the css, but as you sad sometimes it's to hard to do. This works perfect!!! I love the community ;D

@mark yes indeed but this works perfect for my situation
Post Reply

Return to “Layout and Design (CSS & HTML)”