Hi.
I have two weblogs ‘Region’ & ‘Constituency’. Constituency contains a custom field called ‘region-link’ (searchable relationship field) that I have used to link each constituency with a region.
I have added a search to my site so that users can search by constituency to find their region.
How I would like the results to appear…
Searching for: ‘Poole’ found 1 results.
Poole can be found in the region of Dorset (link on ‘Dorset’)
...I appear to be unable to display the Region (Dorset in the eg above) using the following code. I just get a number appear but can’t see what it’s related to.
<h2>Search results:</h2>
<p>Searching for: <b>{exp:search:keywords}</b> found {exp:search:total_results} results.</p>
<p>{exp:search:search_results id="region"}</p>
<p>{title} can be found in region: <a href="http://{auto_path}">{region-link}</a><br />
{/exp:search:search_results}</p>
<p>{embed="includes/footer"}
This is my search code:
{exp:search:simple_form weblog="region|constituency" status="open" result_page="/search-results" search_in="everywhere"}
<label for="keywords">Search</label>
<input type="text" name="keywords" id="keywords" size="20" maxlength="50" />
<input id="search-button" name="submit" value="submit" alt="search" type="image" src="/images/search-btn.png" /></p>
{/exp:search:simple_form}
Can anyone help please?
Thanks