Using the images in the cataloger [Solved!!!]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
JeremyBASS

Re: Using the images in the cataloger [NOT_solved]

Post by JeremyBASS »

I keep going round and round with this... I'm sure it's right in fron of my face, but I can't seem to figure this out right now... Any hope on this would be great... thanks

Jeremy
vaughnt
Forum Members
Forum Members
Posts: 82
Joined: Tue Jun 13, 2006 2:05 pm

Re: Using the images in the cataloger [NOT_solved]

Post by vaughnt »

This is a category template you are working on correct?

Thumbnail image would accessed as:

Code: Select all

{section name=numloop loop=$items}
<img src="{$items[numloop].image}" alt="{$items[numloop].title}"  />
{/section}
Though I feel like I'm maybe missing what you're trying to do.

For what it's worth, take a look at my site which uses Cataloger:
http://www.vaughnsphotoart.com/index.ph ... -additions

I'm doing something somewhat similar, except you click the thumb, and it brings up a modal window with the full size image in it.
--
My photography: http://vaughnsphotoart.com
Festiva Resorts: http://www.festiva.travel
JeremyBASS

Re: Using the images in the cataloger [NOT_solved]

Post by JeremyBASS »

>>>This is a category template you are working on correct?

Yes you are right there...

>>>Though I feel like I'm maybe missing what you're trying to do.

And there too :)

The point is that I want some thing like this...

{if exists $items[numloop].image}
{$items[numloop].image}
{/if}

In short... if the image is there then I what it to be written in the output... if it is not... then it should not be written in there...

Here is the newest version of the template

Code: Select all

{$notes}
<div class="category_items">
<!--[if gte IE 7]><!-->
{literal}
<__script__ language="JavaScript"  type="text/javascript">$(document).ready(function(){  
                $("#cornflex1").cornflex('whitebox_Dira', {
        omega: 20,
        image_t: 'Scripts/RoundedBoxes/whitebox_2_t.png',
        image_r: 'Scripts/RoundedBoxes/whitebox_2_r.png',
        image_b: 'Scripts/RoundedBoxes/whitebox_2_b.png',
        image_l: 'Scripts/RoundedBoxes/whitebox_2_l.png',
        alpha: 12,
        beta: 18,
        gamma: 24,
        delta: 18
                });
});
</__script>{/literal}
<div id="cornflex1">
<!--<![endif]-->
<!--[if lte IE 6]>
<div class="Round" id="box1">
<![endif]--> 
          <span style="float:right;" >{cms_selflink dir="up" label="Return to: " text="Find a Doctor"}<br/> 
{cms_selflink dir="side"}</span><h3 style=" margin-top:-10px; font-size:18px;">Doctors</h3>
        <ul id="DocList">{section name=numloop loop=$items}
		 <li>
         
          <a name="staticLink" href="{$items[numloop].link}" class="tooltip" title="{if $items[numloop].imagename == true}<img src='{root_url}/uploads/images/catalog/{$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"}_t_1_100_1.jpg' title='{$items[numloop].title}' alt='{$items[numloop].title}' style='padding-right:30px; margin-top:10px;'/><br/>{/if}{if $items[numloop].centerlocation == true}<span class='loca'>{$items[numloop].centerlocation}</span>{/if}<br/>
        {$items[numloop].title},<br/> {$items[numloop].nametitle}" target="_self" onmousedown="javascript:toggleDiv('hideMe3')">{$items[numloop].title}, {$items[numloop].nametitle}</a>
		</li>
{assign var="image" value="uploads/images/catalog/".($items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1")"."_t_1_100_1.jpg"}
{if file_exists(root_url."/".$image)}<img src="{root_url}/{$image}" />{/if}
        {/section}

        </ul>
<!--[if lte IE 6]>
<span style="clear:both;"> </span>
<br/><br/><br/><br/><br/><br/>
<span style="clear:both;"> </span>
<![endif]--> 
</div>
</div>
{if $hasnav == 1}<div class="catnav">{$prev}{$navstr}{$next}</div>{/if}
<div style="clear:right;"></div>
<br/>
<br/>
In side there this is what I did.. I have a User-Defined Attributes called Image Name, which I put the page alias in to... (Very time consuming)

which is used to {if $items[numloop].imagename == true}the img{/if}

Code: Select all


{if $items[numloop].imagename == true}<img src='{root_url}/uploads/images/catalog/{$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"}_t_1_100_1.jpg' title='{$items[numloop].title}' alt='{$items[numloop].title}' style='padding-right:30px; margin-top:10px;'/><br/>{/if}

The images are based of the page alias of the item, but I have not been able to access that in the cat page of the child items... so this is the temp work around to make it function... but I need to do something that is not were I create the item, then go back and edit so I can put in the alias, as that is super time consuming over all... well that for the help... Hope that was all clear...

jeremyBass
JeremyBASS

Re: Using the images in the cataloger [NOT_solved]

Post by JeremyBASS »

GOT IT!!!!!
;D

Code: Select all

{assign var="foo" value=$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"} 
{assign var="image" value="uploads/images/catalog/`$foo`_t_1_100_1.jpg"} 
{if file_exists($image)}<img src="{root_url}/{$image}" />{/if} 
Locked

Return to “Modules/Add-Ons”