Page 1 of 1

ecolopop : logo feature

Posted: Fri 29. Oct 2004, 14:53
by erwanpia
I have put up one interesting feature on that site : change top logo depending on structure level. If the logo for a structure level is not present, displays default logo
example, all these pages use the same template
http://ecolopop.free.fr
http://ecolopop.free.fr/index.php?wildlife
http://ecolopop.free.fr/index.php?_bgk

here is the code snippet

Code: Select all

[PHP]
$lid= $GLOBALS['content']['cat_id'];
$path = "img/ecolopop/tl/";
$l="";
$limggif= $path . "l" . $lid . ".gif";
$limgjpg= $path . "l" . $lid . ".jpg";
if (is_file($limgjpg)) $l=$limgjpg;
if (is_file($limggif)) $l=$limggif;
if ($l=="") $l=$path . "l.gif";
echo "<a href=/><img src=" . $l . " border=0 width=356 height=85></a>";
[/PHP]
do you guys like that ?

Posted: Tue 2. Nov 2004, 07:39
by trip
cool idea with the logo... :-)

small comment, I think your site would look much better if it had a separation of sorts between the navigation, content and header...
eg add a greay background to the navigation and a black line between the content and nav....or use cellpadding for your content, so that it does not look so squashed...

hope this helps
TriP

Posted: Thu 4. Nov 2004, 11:17
by erwanpia
thanks i agree totally have a look at the result of your suggestion
small but efficient :wink: