PDA


View Full Version : Clickable custom fields


BWJ
08-26-2008, 08:50 PM
Making custom fields clickable has been a wish for several years. Now I noticed this thread: http://www.vbadvanced.com/forum/showthread.php?t=24734

The following code has been tried within: adv_links_linkbit_custombits template

I have tried numerous times with numerous methods.

Lets say we have custom field group animals with id = 25
Lets say I would like to search MONKEY

1)
The following works:

<div class="smallfont" style="padding-top: $stylevar[cellpadding]px"><em>$cfield[title]:</em> <a href="search.php?$session[sessionurl]do=searchresults&amp;string=MONKEY&amp;catid=0&amp;quicksearch=1&amp;cfields[]=field25" rel="nofollow">$cfieldvalue</a></div>

2)
Now lets say I would like to make any animal clickable within animals with the $cfieldvalue:

<div class="smallfont" style="padding-top: $stylevar[cellpadding]px"><em>$cfield[title]:</em> <a href="search.php?$session[sessionurl]do=searchresults&amp;string=$CFIELDVALUE&amp;catid=0&amp;quicksearch=1&amp;cfields[]=field25" rel="nofollow">$cfieldvalue</a></div>

This does not work

3)
What I really would like to achieve is naturally that you can click any custom field and get similar links with the same custom field. So I would like to get rid of field25 and have it to work for all link categories.

Any suggestion for this?

BWJ
08-29-2008, 10:20 PM
I guess I can repeat the &amp;cfields[]=field25 for each necessary field.

The real problem is how do I connect the search string with the $cfieldvalue?

This is a feature every body can use as it enhances the user experience significantly...

Brian
08-30-2008, 12:49 PM
You should be able to just add "$cfieldvalue" in the URL. You may run into some problems depending on the format of the custom field values, but if they just contain one word and/or no code then that should be all you need.

BWJ
09-01-2008, 07:19 PM
Two words doesn't work. And it really didn't work with one word either. Unfortunately....

If I follow the advice here: http://www.vbadvanced.com/forum/showthread.php?t=24737
I am able to do a search with one word not two. But this advice is only for one specific search not an easy "global code" that can work with every field...

Hyperlinked custom fields (working like tags) would be a super feature....