Page 1 of 1

[SOLVED] Customizing Cataloger to display 7 photos for each item within category

Posted: Sat Oct 18, 2008 12:41 pm
by peterbra
Ok, i have an issue which I can't resolve by myself...

I am using cataloger to catalog peoples which will act in some movies...
I have following categories of page
1. Man
2. Woman
both have sub-sections:
1.1. From 18-30 years
1.2. From 18-30 years
1.3. From 18-30 years

2.1. From 18-30 years
2.2. From 18-30 years
2.3. From 18-30 years

When someone clicks woman-from 18-30 years I want to list all PERSONS and ALL data for persons (each has main image and few other images, height, weight, eye-color and brief description.) 
All I get when i click on category is photo with person name (I used name as "menu item").... so how to pull data out for each person? I managed to do that individually (when clicked on name), but I want to have all info on category page like I can do on a item page ???

I'm not good with smarty so I really don't know how to do it... All I can use on category:

Category Template Variables
{$title}, {$notes}, {$prev}, {$prevurl}, {$navstr}, {$next}, {$nexturl}, {$items}, {$categorynotes}, {$image_1_url}, {$image_thumb_1_url}, {$src_image_1_url}, {$image_url_array}, {$src_image_url_array}, {$image_thumb_url_array}
$items array contents:
$items[].title, $items[].link, $items[].image, $items[].attrname   

and I need to use those variables from Item:
Item Template Variables
{$title}, {$notes}, {$height}, {$weight}, {$eyecolor}, {$dob}, {$shoesize}, {$haircolor}, {$personalinfo}, {$notes}, {$image_1_url}, {$image_thumb_1_url}, {$src_image_1_url}, {$image_2_url}, {$image_thumb_2_url}, {$src_image_2_url}, {$image_3_url}, {$image_thumb_3_url}, {$src_image_3_url}, {$image_4_url}, {$image_thumb_4_url}, {$src_image_4_url}, {$image_5_url}, {$image_thumb_5_url}, {$src_image_5_url}, {$image_6_url}, {$image_thumb_6_url}, {$src_image_6_url}, {$image_7_url}, {$image_thumb_7_url}, {$src_image_7_url}, {$image_url_array}, {$src_image_url_array}, {$image_thumb_url_array}

Any help is appreciated !
                         

Re: Customizing Cataloger to display 7 photos for each item within category

Posted: Sat Oct 18, 2008 2:07 pm
by Coldman
Hi!
Try to add {$items|print_r} in your category template and the browse to your categorypage. There you will see all avaible variables

Re: Customizing Cataloger to display 7 photos for each item within category

Posted: Sat Oct 18, 2008 2:31 pm
by peterbra
Coldman wrote: Hi!
Try to add {$items|print_r} in your category template and the browse to your categorypage. There you will see all avaible variables
Well I get this readings:


Array ( [image] => http://localhost/cmsms/modules/Cataloge ... g&ac=31703 [image_src] => http://localhost/cmsms/uploads/images/c ... _src_1.jpg [link] => http://localhost/cmsms/index.php?page=branislav-nusic [title] => Branislav Nusic [menutitle] => Branislav Nusic [modifieddate] => 2008-10-18 14:57:03 [category] => man [cat] => man [createdate] => 2008-10-18 11:46:47 [height] => 183 [measures] => [haircolor] => black [weight] => 89 [dob] => 24.10.1999 [jacketsize] => 54 [shoesize] => 44 [notes] => like to drink jack daniels ) Array ( [image] => http://localhost/cmsms/modules/Cataloge ... g&ac=40803 [image_src] => http://localhost/cmsms/uploads/images/c ... _src_1.jpg [link] => http://localhost/cmsms/index.php?page=nikola [title] => Nikola Ciric [menutitle] => Nikola [modifieddate] => 2008-10-18 14:57:20 [category] => man [cat] => man [createdate] => 2008-10-18 10:57:40 [height] => 185cm [measures] => / [haircolor] => black [weight] => 90 [dob] => 24.10.1999 [jacketsize] => 54 [shoesize] => 44 [notes] => ) Array


So, what kind of "smarty" tags should I use in category in order to get those listing ?

Sorry for being pain in the ass, but really not good with php and smarty :(

Re: Customizing Cataloger to display 7 photos for each item within category

Posted: Sat Oct 18, 2008 2:40 pm
by Coldman
I suspect that haven't change the [numloop] in sample template so try this for ex.:

{$items[numloop].height}

Re: Customizing Cataloger to display 7 photos for each item within category

Posted: Sat Oct 18, 2008 2:48 pm
by peterbra
Coldman wrote: I suspect that haven't change the [numloop] in sample template so try this for ex.:

{$items[numloop].height}
I haven't changed anything in category template. Here it goes:

{$title}
{section name=numimg loop=$image_url_array}{/section}
{$notes}


  {if $hasnav == 1}
{$prev}{$navstr}{$next}
{/if}
    {section name=numloop loop=$items}
       
{$items[numloop].title}


    {/section}
    {if $hasnav == 1}
{$prev}{$navstr}{$next}
{/if}



I still don't understand how to pull those data here - but I have a feeling that we are on a GOOD way :)
Thanks for helping me !

Re: Customizing Cataloger to display 7 photos for each item within category

Posted: Sat Oct 18, 2008 2:55 pm
by Coldman
In this part you have add the variables:

Code: Select all

{section name=numloop loop=$items}
        <div class="category_item"><a href="{$items[numloop].link}"><img src="{$items[numloop].image}" title="{$items[numloop].title}" alt="{$items[numloop].title}"/></a><br /><a href="{$items[numloop].link}">{$items[numloop].title}</a>

{*You have todo like this to each one the attributes*}
Height: {$items[numloop].height}
</div>
    {/section}

Re: Customizing Cataloger to display 7 photos for each item within category

Posted: Sat Oct 18, 2008 5:59 pm
by peterbra
Coldman wrote: In this part you have add the variables:

Code: Select all

{section name=numloop loop=$items}
        <div class="category_item"><a href="{$items[numloop].link}"><img src="{$items[numloop].image}" title="{$items[numloop].title}" alt="{$items[numloop].title}"/></a><br /><a href="{$items[numloop].link}">{$items[numloop].title}</a>

{*You have todo like this to each one the attributes*}
Height: {$items[numloop].height}
</div>
    {/section}
YOU ARE A STAR !!!!!!!!!
Thanks a million !

Just one more question...
For each person I have at least 3 images and I want them listed as well (i made a CSS class that will re-size them as thumbs, and on click - javascript pop-ups window with that photo)

The thing is I can't get them listed?
I tried:

{$items[numloop].image_thumb_1_url}
{$items[numloop].image_1}
{$items[numloop].image_1_url}

etc... but I just couldn't get them displayed ?

Once again - THANKS A LOT !

Re: Customizing Cataloger to display 7 photos for each item within category

Posted: Sun Oct 19, 2008 5:09 pm
by Coldman
I removed this because of the forum rules.

/Coldman