Menu with text in two lines (SOLVED)
Hope someone can help me here.
I I'm about to create a main menu with text in two lines like this:
ABOUT US
read more about us
... and so on.
But now I'm a bit unsure how I make this in TYPOlight. It would have been nice if i could put line number 2 into a SPAN or something like that. But I'm not allowed to put codes into the page name field.
Can anyone help me here?
Re: Menu with text in two lines
Quote:
Originally Posted by stefanjohannsen
Can anyone help me here?
ABOUT US - I assume it's page name
read more about us - but what's it? Page description or what?
Re: Menu with text in two lines
Actually I would be nice just write something in the "page name" field like this:
About us
<span>a little more info</span>
But if it would be possible to have the "page description" or the "page title" to go there this could be a solution.
Re: Menu with text in two lines
If additional text will page description (set in page setting) you have to modifity your nav_YOURNAME.tpl file.
It should lokks something like this:
Code:
<ul>
<?php foreach ($this->items as $item): ?>
<?php if ($item['isActive']): ?>
<li class="active"><a href="<?php echo $item['href']; ?>" title="<?php echo $item['pageTitle'] ? $item['pageTitle'] : $item['title']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; ?><?php if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?><?php if ($item['nofollow']): ?> rel="nofollow"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>"><?php echo $item['link']; ?>
<span><?php echo $item['description']; ?></span></a><?php echo $item['subitems']; ?>
<?php else: ?>[*]<a href="<?php echo $item['href']; ?>" title="<?php echo $item['pageTitle'] ? $item['pageTitle'] : $item['title']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; ?><?php if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?><?php if ($item['nofollow']): ?> rel="nofollow"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>"><?php echo $item['link']; ?>
<span><?php echo $item['description']; ?></span></a><?php echo $item['subitems']; ?>
<?php endif; ?>
<?php endforeach; ?>[/list]
for you most important is this piece:
Code:
<span><?php echo $item['description']; ?></span>
In other case when additional text is custom text only way is to use javascript.
Re: Menu with text in two lines (SOLVED)
Thank you for your help and quick reply.
This work like a charm :-)
I decided to use the "pageTitle" instead.