Page 1 of 1

Other question to same topic [solved]Product's hierarcy and summary

Posted: Thu Oct 14, 2010 6:27 pm
by Recon
Hi,

I know basics from html, css and smartytags (can build ugly site)... I have a problem with product module. I dont understand how modules' hierarcy and summary works. How I can add styles for hierarcy tree or change the looks of summary page?

I would be very thankful if someone help me to start...

Hierarcy's sample template looks like this and it only gives hierarcy tree.

{* hierarchy report template *}
{if !isset($hdepth) && isset($hierarchy_item)}
Hierarchy Data for {$hierarchy_item.name} ({$hierarchy_item.id})
{/if}

{if !isset($hdepth)}{assign var='hdepth' value='0'}{/if}
{*
// create a nested set of unordered lists
// if the active_hierarchy smarty variable exists
// and matches the current hierarchy id
// the active class will be given
// to the ul.  You may want to modify your summary template
// to set this variable
*}

{foreach from=$hierdata key='key' item='item'}
{strip}
 
 {if $item.count gt 0}
    {$item.name} ({$item.count})
 {else}
    {$item.name} ({$item.count})
 {/if}
 
 {if isset($item.children) }
   {* there are children call this template again *}
   {include file=$smarty.template hierdata=$item.children hdepth=$hdepth+1}
 {/if}
 
 
{/strip}
{/foreach}



-Recon

Re: Product's hierarcy and summary

Posted: Thu Oct 14, 2010 6:29 pm
by Dr.CSS
You would use the UL class to target it for styling in a style sheet...

Re: Product's hierarcy and summary

Posted: Thu Oct 14, 2010 7:47 pm
by Recon
Hi Dr.

Thank you for your answer. Can I just put CSS to the same "window"... or where?  ???
Example would be great ;)

-Recon

Re: Product's hierarcy and summary

Posted: Thu Oct 14, 2010 8:44 pm
by Dr.CSS
You can either add some CSS to an existing style sheet attached to the page template or make a new style sheet for this and attach it to the page template...

I use Firefox with the Web Dev. tool bar to make changes to css on a trial basis as it also has a outline current element option so you can hover parts of the page to see what to target, so open both and check what to target then change the css in the css edit mode and when you get it right copy what you did into a style sheet...

Re: Product's hierarcy and summary

Posted: Fri Oct 15, 2010 7:04 am
by Recon
Thank You, thank You... that was veeeeeery helpful tip to me. I got it working !


-Recon

Re: [solved]Product's hierarcy and summary

Posted: Fri Oct 15, 2010 10:44 am
by Recon
I am so close... :)

I have added some tag to summary template and it seems to be working, but how I can show fields.image in summary? If I added tag {$entry->fields.image->value} it will show only picture's name (1.jpg)

-Recon

Re: Other question to same topic [solved]Product's hierarcy and summary

Posted: Fri Oct 15, 2010 3:23 pm
by Dr.CSS
Then you need to wrap that in a default img src= call...

Re: Other question to same topic [solved]Product's hierarcy and summary

Posted: Sun Oct 17, 2010 10:36 am
by Recon
fields.image->value}" alt="name" />

Dont work  ??? .....so frustrated, so close :)

-Recon

Re: Other question to same topic [solved]Product's hierarcy and summary

Posted: Sun Oct 17, 2010 5:15 pm
by Dr.CSS
In your img src= you need to add the path to the first part of it, if your images are in a folder in uploads...

fields.image->value}' alt='{$entry->fields.image->value}' />