1
incama
Every module it's own stylie [SOLVED]
  • 2004/9/13 17:23

  • incama

  • Friend of XOOPS

  • Posts: 513

  • Since: 2003/10/24


Is it possible that each module has it's own stylesheet? Read stylesheet not template.

I want for example the even and odd class react differently within different modules.

my modules.css would look like for example:

#contact a {
    
color:#369;
    
font-weightbold;
    
text-decoration:none;
    }
#contact a:hover {
    
color:#598894;
    
font-weightbold;
    
text-decoration:none;
}
#contact #even {
    
background-colorAqua;
    
colorAqua;
}
#mylinks {
padding-top3px;
width:535px;
}
#mylinks a {
    
color:#369;
    
font-weightbold;
    
text-decoration:none;
    }
#mylinks a:hover {
    
color:#598894;
    
font-weightbold;
    
text-decoration:none;
}

etc....I know Micheal (Xoopstuned) once had this hack,but somehow I lost touch with him. Could anyone help me with this one so we could put XOOPS webdesign onto a higher level???

Thank you in advanced

2
studioC
Re: Every module it's own stylie
  • 2004/9/27 17:11

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


hello dave,
sorry for late answer but during 2 weeks hospital i missed most of postings :) i actually find a bit time to dig through older postings .. :)

yes, i use a little script found here on xoops.org to identify actual modulfolder-name(including system). I know it's a php script ...

i put it before opening head tag :
--------------------------------------------
<{php}>
$module = $GLOBALS['xoopsModule'];
if ( isset($module) ) {
$module = $module->getVar('dirname');
}
else {
$module = 'system';
}
$GLOBALS['xoopsTpl']->assign('modname', $module);
<{/php}>
----------------------------------------------

this gives me the possibility to use <{$modname}> in theme.html

Loading different stylesheets -
here is a way of loading different stylesheets :

... of course you won't need own stylesheets for that example you have discribed... :(and i ... <quote> Read stylesheet not template </quote> :) ... for eg. you can give that div in which you call <{$xoops_contents}> the id="<{$modname}>")

but perhaps i missunderstood your question (as often ..)

<style type="text/css">
<!--
@import url(yourpath..../basics.css);
@import url(yourpath..../presentation.css);
@import url(yourpath..../additional<{$modname}>.css);
-->
</style>


besides basic stylesheets i can now load additional modulestylesheets with additional information only loaded on that modul (if needed)

keep up that good work!

cheers
michael


3
incama
Re: Every module it's own stylie
  • 2004/9/28 4:42

  • incama

  • Friend of XOOPS

  • Posts: 513

  • Since: 2003/10/24


Thanks Michael,,,,again,.
It's very nice to see that you're back again,.

Dave

Login

Who's Online

150 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 150


more...

Donat-O-Meter

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

Latest GitHub Commits