>>>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