| Re: xo-banner for the module News |
| by tatane on 2011/1/8 17:28:18 I managed to do what I wanted but in a different way. I'll explain. In the file there xobanner.html code le="color: #000000"><?php <div id="xo-banner" class="<{$xoops_dirname}>"> So I created a class # xo-banner.news module for my news and new a new div for xo-main-logo and it works flawless <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> <{if $xoops_dirname =="news"}> <a id="xo-main-logo2" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> <{/if}> css : #xo-banner.news { clear: both; /* Use relative pos to ensure the banner ad img/flash is relative to the header */ position: relative; z-index: 100; width: 100%; height: 160px; background:#FFF url(../img/Bandeau-blog.jpg) repeat-x left bottom; color: #7BADEA; } #xo-banner { clear: both; /* Use relative pos to ensure the banner ad img/flash is relative to the header */ position: relative; z-index: 100; width: 100%; height: 160px; background:#FFF url(../img/header-bg.png) repeat-x left bottom; color: #7BADEA; } #xo-main-logo { float: right; } #xo-main-logo2 { float: right; position: relative; margin-top: -160px; } |
| Re: xo-banner for the module News |
| by Mamba on 2011/1/8 16:29:29 Just looking at that, it seems like you could shorten it, but saying something like: if News then this banner else the other banner so you don't have to list all the non-News banners. Unless I am missing something here and you want eventually specify a different banner for each of the individual modules. |
| xo-banner for the module News |
| by tatane on 2011/1/7 18:08:13 Hello I want to display a different banner for the News module. So I modified a theme from template zetagenesis. In the template xobanner.html I've placed the code below le="color: #000000"><?php <{if $xoops_dirname =="system"}> <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> <{if $xoops_dirname =="liaise"}> <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> <{if $xoops_dirname =="evennews"}> <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> <{if $xoops_dirname =="mytube"}> <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> <{if $xoops_dirname =="pm"}> <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> <{if $xoops_dirname =="profile"}> <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> <{if $xoops_dirname =="publisher"}> <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> <{if $xoops_dirname =="xdonations"}> <div id="xo-banner" class="<{$xoops_dirname}>"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/heade.png}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> <{if $xoops_dirname =="news"}> <div id="xo-banner2"> <a href="<{xoAppUrl /}>"><img src="<{xoImgUrl img/Bandeau-blog.jpg}>" alt="<{$xoops_sitename}>" /></a> <a id="xo-main-logo2" href="<{xoAppUrl /}>modules/xdonations"><img src="<{xoImgUrl img/header-logo.png}>" alt="<{$xoops_sitename}>" /></a> </div> <{/if}> It works fine, the problem is that I wanted to know if the code was clean and then if there were an easier way to use the News module Thank you |