Problem mit cms_selflink

Hilfe zu Modulen und Tags
Post Reply
Mark Twain

Problem mit cms_selflink

Post by Mark Twain »

Hallo,

zuerstmal: Super CMS!

Nun zu meinem Problem: Ich habe 'home' (heisst bei mir 'Startseite') aus der horizontalen leiste herausgenommen und separat in ein eigenes div gepackt.
Aber ich bekomme es nicht hin, das der Button einen anderen Farblichen Hintergrund behält, wenn diese Seite ausgewählt (aktiv) ist. hover funktioniert jedoch.

Im Template habe ich es wie folgt eingebunden:
         
              {cms_selflink page="startseite"}
           
         
Das CSS dazu sieht im moment so aus:
/********************
MENU
*********************/

/* hack for Internet Explorer */
* html div#menu_horiz_l {
  /* hide ie/mac \*/
  height: 1%;
  /* end hide */
}

/*
background-color for the entire menu row,
covering 100% of the width and text center-aligned
*/
div#menu_horiz_l {
  background-color: none;  /* background color for the entire menu row */
  width:100% !important;
  width:auto;
  margin: 0 0;
}

/*
the menu ul box has top and left border,
right border is provided by the li elements
*/
div#menu_horiz_l ul {
  margin: 0 0 0 0;
  padding: 0;
  border-bottom: 0px solid #C0C0C0;
  border-left:  1px solid #C0C0C0;
  height:2.4em;
}


/* menu list items */
div#menu_horiz_l li {
  float: right; /* makes the list horizontal */
  list-style: none; /* hides the list bullet */
  margin: 0 0;
  border-left: 1px solid #C0C0C0;
}


/* the links, that is each list item */
div#menu_horiz_l a {
  padding: .6em 2em .6em 2em; /* padding inside the list item box */
  margin: 0 0; /* margin outside each list item box */
  text-decoration: none; /* no underline for links */
  color: #18507C;
  font-weight:bold;

  display: block; /* IE has problems with this, fixed above */
}


/* hover state for links */
div#menu_horiz_l li a:hover {
  background-color: #c0ddf3;
}
div#menu_horiz_l a.activeparent:hover {
  background-color: #C3D4DF;
  color: #18507C;
}

/* active parent, that is the first-level parent of a child page that is the current page */
div#menu_horiz_l li.activeparent a {
  background: #385C72;
  color: #fff;
}

div#menu_horiz_l h3 {
  padding: .6em 1em .6em 1em; /* padding inside the list item box */
  margin: 0; /* margin outside each list item box */
  text-decoration: none; /* no underline for links */
  color: #fff;
  background: #3693D8;

  display: block; /* IE has problems with this, fixed above */
  font-size: 1em;                          /* instead of the normal font size for */
}
und das Datenbank Template (ist das einzige) sieht so aus (müsste Standard sein):
{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.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 prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0}
{/if}

{if $node->current == true}
{$node->menutext}

{elseif $node->parent == true}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}>{$node->menutext}

{elseif $node->type == 'sectionheader'}
{$node->menutext}

{elseif $node->type == 'separator'}


{else}
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 != ''} target="{$node->target}"{/if}>{$node->menutext}

{/if}

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

{/if}
Was muss ich wo ändern? Im normalen Horizontalen Menue funktioniert das doch auch.  ??? :-\
cyberman

Re: Problem mit cms_selflink

Post by cyberman »

Mark Twain wrote: Aber ich bekomme es nicht hin, das der Button einen anderen Farblichen Hintergrund behält, wenn diese Seite ausgewählt (aktiv) ist.
Wie du (evtl.) im Template sehen kannst

Code: Select all

{if $node->current == true}
<li class="currentpage"><h3>{$node->menutext}</h3>
müsstest du den aktuellen Link mit

Code: Select all

li.currentpage h3 {}
oder

Code: Select all

.currentpage h3 {}
formatieren können.
Post Reply

Return to “Module und Tags”