Results 1 to 5 of 5

Thread: Menu with text in two lines (SOLVED)

  1. #1
    New user
    Join Date
    08-14-09.
    Posts
    25

    Default 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?

  2. #2
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default 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?
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  3. #3
    New user
    Join Date
    08-14-09.
    Posts
    25

    Default 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.

  4. #4
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default 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.
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  5. #5
    New user
    Join Date
    08-14-09.
    Posts
    25

    Default 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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •