Jump to content

Categories Sidebox


Recommended Posts

What I am trying with the categories sidebox is this :

- use images at the top of the box

- display top level categories and their child categories (tree)

In another version of cart software, this is achieved by using this code (in categories-tree.tpl)

{foreach from=$categories item=category key=cat_key}

<table cellpadding="0" cellspacing="0" width="100%"	border="0">

{if $cat_key ne "0" and $category.level == "0"}

<tr>

	<td colspan="3" style="background-image: url('{$images_dir}/sidebox_body_delim.gif');">

		<img src="{$images_dir}/spacer.gif" width="1" height="7" alt=""></td>

</tr>

{/if}

<tr>

	<td width="1">

		<img src="{$images_dir}/spacer.gif" width="{math equation='x*y' x='8' y=$category.level}" height="1" border="0" alt=""></td>

	<td width="100%">

		<a href="{$index_script}?{$target_name}=categories&category_id={$category.category_id}" class="{if $category.level == "0"}sidebox-rootcategory{else}sidebox-subcategory{/if}">{$category.category}</a></td>

	{*

	<td align="right">

		{if $category.level == "0"}<img src="{$images_dir}/category_expanded.gif" width="14" height="15" border="0" alt="">{else}<img src="{$images_dir}/spacer.gif" width="14" height="15" border="0" alt="">{/if}</td>

	*}

</tr>

</table>

{/foreach}

I have attached an image to better show the output.

What code do I need to replace the current code in styleTemplates/boxes/categories.tpl to achieve this look ?

Thankyou in advance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...