Hello I want to add two extra fields to the listings that I can enter an external link in the same way that the Website Field is setup. I tried adding a new extra field and entering the html code for the link but when it showed in the listing it was not clickable the way the Website field is. It only showed the text. Can anyone tell me how to do it. Thanks for any help. Cheers Hugh
Hugh, I have just recently made this same change. I will see if I can't locate the code tommorow and let you know how I did it.
Sorry I got side tracked. I believe how I did was like this: Code: {if isset($extras.value)} {foreach key=key item=item from=$extras.value} {if $extras.fID==4 || $extras.fID==5} {$item|linkurl:30} {else} {$item} {/if} {/foreach} {/if} You would change this line to the field id of the extra fields. {if $extras.fID==4 || $extras.fID==5} To get these values you should be able to place {$extras.fID} before the {$item}
Hello Eric Thanks for the code Which file to I find the code in, or do I have to insert this code into a file? Sorry for the dumb question, but I am new to PHP. Cheers Hugh
Sorry I should have included that. It will be the template file viewlistings.tpl.php or viewlistings2.tpl.php the first one is the standard with the images on the side where viewlistings2 has the images on top.
Hello Eric I am just about to try this. Where do I find the field id for the extra fields. I had a look in the administration section but could not find them there. Cheers Hugh
To get these values you should be able to place the following: ID: {$extras.fID} Before {$item} In that same file. If nothing is printed then let me know because there might be another step I am missing. Also are you running the developer edition?
Hello Eric Yes I am running the Developer version. I looked all through viewlisting.tpl.php and there is no mention of id for the extra fields. I inserted {if isset($extras.value)} {foreach key=key item=item from=$extras.value} {if $extras.fID==4 || $extras.fID==5} {$item|linkurl:30} {else} {$item} {/if} {/foreach} {/if} into line 60 before the {$item} but it made no difference. The example page I want to have the clickable field is the Six Generation Pedigree:field on http://www.thoroughbreddiaries.com/viewlisting.php?view=3 Any idea where I would find the id for the extra fields, or do I need to do something else. Cheers Hugh
I'm looking for the same solution but can't find which line to place this mod... EDIT: Hasty post -found it now!