Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthords59
    • CommentTimeSep 6th 2009
     permalink
    Hi all,

    i am trying to set up a simple CMS like theme, based on Deckay 3.0 by Zeuder. Using the horizontal menu in the top bar for static pages, i would like to hilight the currently viewed page in the menu to improve the navigation for the user. How can i do this?

    Daniel
    •  
      CommentAuthorlantaca
    • CommentTimeSep 7th 2009 edited
     permalink
    I have made a theme with a top bar, but i started from leggero style.
    in this discussion there are some istructions, but is in italian language... if you don't undrestand anyting, i try to help you... i hope... :D

    update: link
    sorry... :P
    •  
      CommentAuthords59
    • CommentTimeSep 7th 2009
     permalink
    @lantaca: is there a link for that discussion?

    at the moment im trying to get it running like it is shown on http://dkdenz.de/index.html
    I was able to add
    <code><body id="pagename">
    <a href="index.html" class="main" id="pagename_menu">pagename</a></code>,
    but css for #pagename #pagename_menu doesnt work...
  1.  permalink
    I saw Deckay 3.0. It's great!
    I think that horizonal menu uses the widget of menubar.
    So, add the menu-bar widget and below codes in your theme.
    This code incomplete, sorry.

    add below in theme.conf.php .
    register_widgetset('menubar');

    add below in header.tpl.

    <div id="menu">
    {widgets pos=menubar}
    <div id="{$id}">
    {$content}
    </div>
    {/widgets}
    </div>



    add below in style.css.
    /*== MENU ==*/
    #menu {
    background: #a00;
    height: 40px;
    margin: 0;
    padding: 0;
    text-align: left;
    width: 700px;
    }
    #menu ul{ margin: 0; padding: 0; list-style: none;}
    #menu li{ display: inline;}
    #menu li a:link, #menu li a:visited, #menu a:active{
    display: block !important;
    display: inline; /* ie6 fix margin*/
    float: left;
    color: #FEFEFE;
    font-size: 1.0em;
    margin: 0 16px;
    padding: 10px;
    text-decoration: none;
    }
    #menu li a:hover{ color: #fff;background: #aaa;}


    And add the widget on 'menubar'. i.e. 'BlockParser:menu' .
    you will see menu-bar on your blog top side.
    •  
      CommentAuthords59
    • CommentTimeSep 8th 2009 edited
     permalink
    @Nakamachidai: i already have the menu bar...

    Included in the menu bar are links to static pages, and the blog itself:
    Start, Blog, Profile, About, Contact

    In Deckay, there is a 1px line below the Menu Item where the mouse is (hover). This "mark" disappears after clicking the menu item.
    I want this line to stay below the selected item to indicate in the menu, which according page is shown.
    Usage of "active" does not work, because "active" is defined as the "time between click & release of the mouse button"...

    Any ideas?
    Anyone?
    •  
      CommentAuthorNoWhereMan
    • CommentTimeSep 8th 2009 edited
     permalink
    you can't do that with widgets, because blockparser widgets can't be aware of such things as current page.

    You can create a custom widget such as "adminarea" and make it output a custom class such as 'current-page' on the link you want to be highlighted.

    such a class would be output by checking against the global variable $fp_params['page'] if you want to see if you're on some page or $fp_params['category'] if you want to check for a given category id.

    e.g.


    function mywidget() {

    global $fp_params;
    if (isset($fp_params['page']) && $fp_params['page'] == 'about')
    $out = '<a href="#" class="active-page">my link</a>';
    else
    $out = '<a href="#">my link</a>';

    return array('subject' => 'my cool widget', 'content' => $out);

    }

    you can also hardcode a topbar in your theme and use conditional statements such as

    <a href="#" {if $flatpress.params.page == 'about'} class="acrive-page" {/if}>my link </a>

    right in your tpl.

    search the forum there should be some example

    HTH