This topic is locked
[SOLVED]

 Adding a Hyperlink to a {$value}

4/9/2010 2:35:44 PM
PHPRunner General questions
powersitedesign author

I used to be able to go into my list pages and add custom URL's that would pull up search results from another table using the {$value} as the search term but for some reason I am unable to make this happen and I have been going back and forth over it for 2 days now. Here's what I am working on:
ARCB - List of State Associations

ARCB - Search Results for "Arkansas" - (this is what I want the link to go out to)
Here's the source code from inside my smarty template:

{BEGIN school_association_state_fieldcolumn}<TR>

<TD style="WIDTH: 30%" class=shade></TD>

<TD align=left><a href="http://www.arcb.net/arcb-database/state_associations_list.php?ctlSearchFor={$school_association_state_value}&simpleSrchTypeComboNot=&a=integrated&id=1&criteria=and">{$school_association_state_value}</a>;

</TD></TR>{END school_association_state_fieldcolumn}


But as you can tell it's not working for me. I know that this is possible because the site used to do this before I went in to make some other updates. I even tried to add a hyperlink to this but didn't know where to put the long URL path in at? I also looked at custom but didn't know what that would look like either... Can someone help me out?


This is probably something simple that I am forgetting, I have gotten real rusty w/ my PHPR skills.

Thanks for your help in advance!!!

powersitedesign author 4/9/2010

Also, here's another example of what I am trying to accomplish (that is actually working). Something has happened however now w/ the search feature I guess that has stopped that sort of linking w/ a {$value} in the URL??

powersitedesign author 4/10/2010

Just an update, it's 2:30am and I have been looking at how to maybe fix this using Custom Selection in the Visual Editor, I dropped this snippet in but it wouldn't work for me either, but I think I might have been close...

global $data;

$value = "<a target=_blank href=\"http://www.arcb.net/arcb-database/state_associations_list.php?ctlSearchFor=".$data["school_association_state"]."; ".$data["&simpleSrchTypeComboNot=&a=integrated&id=1&criteria=and"]." \">ALSO NEED TO CALL SCHOOL_ASSOCIATION_STATE_VALUE HERE!</a>";
powersitedesign author 4/10/2010

I was finally able to accomplish what I was wanting to do but had to go about it in a lot different way than I was used to. Here's what I had to do...

I had to use the Visual Editor to locate the {$field_value} and then set it up as a hyperlink w/ the prefix being:

state_associations_list.php?a=search&value=1&SearchOption=Equals&SearchFor=


I also selected that particular value in the drop down at the bottom of your options screen. Everything seems to be working now but I was curious as to why all of a sudden this technique changed? Thanks for your help in advance...