Search Link in Field
8 posts by 2 authors in: Forums > CMS Builder
Last Post: July 9, 2010 (RSS)
By fleff - July 8, 2010
<?php if($agentsRecord['view_my_listings']): ?>
<span class="wysiwyg_content"><?php echo $agentsRecord['view_my_listings'] ?></span><br/>
<?php else: ?>
<?php endif ?>
That works fine but I can't figure out how to script the link in the wysiwyg field to show the agent's active listings. I've tried: "/houses.php/status_keyword=For+Sale&agent_name_keyword=Peter" (without quotes) where "houses.php" is the listings viewer. "For Sale" is in the Status field of a section editor called House Listings and "Peter" is in a field called Agent Name in a section editor called Agents. When I click on the link I get "No input file specified. " What should I be doing? Is there a better way to accomplish what I'm trying to do? Your help would be much appreciated.
Farnham
Re: [fleff] Search Link in Field
By Jason - July 8, 2010
One things you can try is, instead of using the agent's name, you could use the agent's user number. In the example you gave, if you have two agents for example: Peter Smith, Peter Jones, This query would return the records for both of them.
If each listing has an agent number attached to it, you could try something like this:
"/houses.php/status_keyword=For+Sale&agent=4"
Where agent is the name of the agent field in the listings table.
Give this a try. If you're still having trouble, could you please provide a link to the listings page where you're having the problem and attach houses.php so I can take a closer look.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Search Link in Field
By fleff - July 8, 2010
I've tried everything I can think of to make this work. There's probably some simple thing I'm overlooking. I've attached the houses.php file as you requested. Here is the link to the page giving me the trouble: http://klemmrealestate.com/agents_details.php
You will see here the various ways I've tried to get it to work. Neither page is finished yet.
Thanks for checking it.
Farnham
Re: [fleff] Search Link in Field
By Jason - July 8, 2010
Could you attach the agent_details.php and the houses.php files so that I can take a look at the code being used?
thanks
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Search Link in Field
By fleff - July 8, 2010
Farnham
Re: [fleff] Search Link in Field
By Jason - July 9, 2010
I'm going to need to be able to see how your scripts are actually running. If you could email your CMS Builder login and FTP information to jason@interactivetools.com I can take a closer look.
Please only email this information, don't post it to the forum.
Thanks.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [fleff] Search Link in Field
By Jason - July 9, 2010
I think I found the problem. The automatic search functionality of CMS Builder only words when URL variables use the same names as the field names in the database. In this case, the field in the listings table that holds the name(s) of the people listing the property is called "listed_by".
So if you wanted to get all of the properties with a status of "For Sale" that are listed by an agent with Peter in their name, you could use:
/houses.php/status_keyword=For+Sale&listed_by_keyword=Peter
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Search Link in Field
By fleff - July 9, 2010
Farnham