1
nmshah
How to Style Active link (link of current page) differently
  • 2009/11/15 17:17

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


How to style the link of current page, to highlight the same.
I am using zetagenesis theme and the menu is generated dynamically from the content module updated by kerkyra.

2
ghia
Re: How to Style Active link (link of current page) differently
  • 2009/11/15 17:42

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Use
<{if $xoops_dirname == 'news'}>
 <
style
  ... 
 </
style>
<{/if}>
etc, in your theme.html to influence whatever needed.

3
kris_fr
Re: How to Style Active link (link of current page) differently
  • 2009/11/15 19:11

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


or in style.css

body#modulename yourclass
body"modulename yourid
etc..

@++

4
nmshah
Re: How to Style Active link (link of current page) differently
  • 2009/11/16 4:01

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Thanks Ghia and kris,
Sorry but my last post was very vague, i will try to explain it better,

Content module has a block named "DHTML Site Menu" in which links are generated when a new page is created in the content module. The module while creating a link is not adding a different id to individual links.

Also if I get the module to somehow add a different id to each link, every time a link is created I will have to add the new link in css for it to take effect.

Is there a method by which I do not have to play with css every time a link is added.

Thanks again

5
ghia
Re: How to Style Active link (link of current page) differently
  • 2009/11/16 4:18

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I have no clue about what you are talking (Can you give a more practical example or a screenshot) and I do also not understand that you want things styled differently, but not want to add different style rules?

6
nmshah
Re: How to Style Active link (link of current page) differently
  • 2009/11/16 5:33

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


@ghia,

I wish to give a different background color to the link of the page on which the visitor is currently in the the site menu.

Its like the XOOPS WOX theme where when we go to the forums the background color for the forum link changes to light blue (see the horizontal links on this page) and the same applies to all the links when you are on that page whether its xoops, faq, forum, news, themes or modules.

I understand that these are all different modules and the links are most probably manually coded in the theme, so both yours and kris methods would work by either adding a module specific rule or adding a different id to each link and add css rules for each of them.

My problem is that I am not adding the links to the theme manually, the menu gets generated using the "dhtml site menu block" of the content module 1.3.

So I can not write a module specific code as all links belong to the content module and also can not use the id method mentioned by kris as the content module does not add a separate id for each link.

Login

Who's Online

163 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits