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

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Recon
Forum Members
Forum Members
Posts: 200
Joined: Sat Oct 09, 2010 10:23 am

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

Post 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
Last edited by Recon on Fri Oct 15, 2010 10:45 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Product's hierarcy and summary

Post by Dr.CSS »

You would use the UL class to target it for styling in a style sheet...
Recon
Forum Members
Forum Members
Posts: 200
Joined: Sat Oct 09, 2010 10:23 am

Re: Product's hierarcy and summary

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Product's hierarcy and summary

Post 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...
Recon
Forum Members
Forum Members
Posts: 200
Joined: Sat Oct 09, 2010 10:23 am

Re: Product's hierarcy and summary

Post by Recon »

Thank You, thank You... that was veeeeeery helpful tip to me. I got it working !


-Recon
Recon
Forum Members
Forum Members
Posts: 200
Joined: Sat Oct 09, 2010 10:23 am

Re: [solved]Product's hierarcy and summary

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post by Dr.CSS »

Then you need to wrap that in a default img src= call...
Recon
Forum Members
Forum Members
Posts: 200
Joined: Sat Oct 09, 2010 10:23 am

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

Post by Recon »

fields.image->value}" alt="name" />

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

-Recon
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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}' />
Post Reply

Return to “Layout and Design (CSS & HTML)”