lokjah
12-14-2005, 10:25 PM
I have an unordered list where I am linking to browse categories like so:
<ul id="portfoliocatlist">
<li><a href="/portfolio/index.php?x=browse&category=1">Commercial-Restaurant</a></li>
</ul>
I am using that on both my browse_template and my image_template in a sidebar to provide a navigation.
What I would like to achieve is to have the list item display on the hover state (highlighted) depending which image is being displayed
(if an image from the Commericial-Restaurant category is being displayed then that link in the list will be highlighted)
the css/xhtml part is a snap, I just need help with the pixelpost bit.
I tried (lol) to create an addon but it was too over my head to understand what I needed to get from the db. in a nutshell heres what I tried:
<ul id="portfoliocatlist">
<li<?php if ($image_category_number== "1")
echo " id=\"currentpage\""; ?>><a href="/portfolio/index.php?x=browse&category=1">Commercial-Restaurant</a></li>
</ul>
<?php
$tpl = str_replace("<PORTFOLIO_NAV>",$image_category_number,$tpl);
?>
I then tried something to this effect:
<?php
$image_category_link .= "<a href='$PHP_SELF?x=browse&category=$cat_id'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
?>
<?php
$tpl = str_replace("<MY_IMAGE_CATEGORY>",$image_categoryword." ".$image_category_link,$tpl);
?>
then with that I was going to insert <MY_IMAGE_CATEGORY> back into my li's like so:
<li id="<MY_IMAGE_CATEGORY>"><a href="/portfolio/index.php?x=browse&category=1">Commercial-Restaurant</a></li>
thinking that it would output the category name (Commercial-Restaurant) that I could use as an id for my css
TIA for any help
-clint
<ul id="portfoliocatlist">
<li><a href="/portfolio/index.php?x=browse&category=1">Commercial-Restaurant</a></li>
</ul>
I am using that on both my browse_template and my image_template in a sidebar to provide a navigation.
What I would like to achieve is to have the list item display on the hover state (highlighted) depending which image is being displayed
(if an image from the Commericial-Restaurant category is being displayed then that link in the list will be highlighted)
the css/xhtml part is a snap, I just need help with the pixelpost bit.
I tried (lol) to create an addon but it was too over my head to understand what I needed to get from the db. in a nutshell heres what I tried:
<ul id="portfoliocatlist">
<li<?php if ($image_category_number== "1")
echo " id=\"currentpage\""; ?>><a href="/portfolio/index.php?x=browse&category=1">Commercial-Restaurant</a></li>
</ul>
<?php
$tpl = str_replace("<PORTFOLIO_NAV>",$image_category_number,$tpl);
?>
I then tried something to this effect:
<?php
$image_category_link .= "<a href='$PHP_SELF?x=browse&category=$cat_id'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
?>
<?php
$tpl = str_replace("<MY_IMAGE_CATEGORY>",$image_categoryword." ".$image_category_link,$tpl);
?>
then with that I was going to insert <MY_IMAGE_CATEGORY> back into my li's like so:
<li id="<MY_IMAGE_CATEGORY>"><a href="/portfolio/index.php?x=browse&category=1">Commercial-Restaurant</a></li>
thinking that it would output the category name (Commercial-Restaurant) that I could use as an id for my css
TIA for any help
-clint