Customising search results and search index templates by weblog.
Posted: 20 July 2004 02:10 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  05-15-2004

I’ve created for one of my blogs a customised search results template, and search index template.

The problem is in the search link at the top of the search results template (this is on the standard one).

This is the code I have there..
<h1 class=“title”>  <a href=”{homepage}”>{exp:weblog:weblog_name weblog=“music”}</a> ›   <a href=”{path=music/search_index}”> {lang:search}</a>  ›  {lang:search_results}</h1>
<p>You searched for <strong>{exp:search:keywords}</strong>, and I found {exp:search:total_results} entries containing that.</p>

Much of that is from the original template, but the link to the search page I’ve changed to reflect the music template group, and the search_index template.  But clicking that link on the search results page just takes you to the site index page.

What have I missed?

The blog is at http://the-onion.net/weblog/
This is a link to a search results page here - I hope that will work, if not, and you want to see, I’m sure you can figure out how to search wink

The search index page I’m trying to reach isn’t formatted properly yet, so please ignore the mess smile

Profile
 
 
Posted: 20 July 2004 07:02 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9853
Joined  06-19-2002

Okay, I think I understand what you’re saying; please correct me if I’m wrong.

On your search results page, the “Search” link in the breadcrumb trail is currently pointing to http://the-onion.net/weblog/index.php/music/search_ while it should point to http://the-onion.net/weblog/index.php/music/search_index.

The reason it’s pointing to the wrong Template is because you’re using {path=music/search_index}.  EE, unfortunately, is stripping the “index” off the end of the path.  This is definitely a defect; I thought it was one that had already been fixed, but perhaps not.  If you’ve made sure you’re running the latest version of the scripts and you get this error then you can report it in the Bug Reports forum.


In the meantime, you could get around the problem by using this:

<a href="{path=music/search_}index"> {lang:search}</a>

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 20 July 2004 07:07 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  05-15-2004

thanks!  and I am.  I made sure first smile

Profile
 
 
Posted: 20 July 2004 07:09 PM   [ Ignore ]   [ # 3 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  05-15-2004

except that makes the link http://the-onion.net/weblog/index.php/music/search_/index.

Profile
 
 
Posted: 20 July 2004 07:16 PM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9853
Joined  06-19-2002

Hmm, well, I guess you’ll have to hard-code the link for the time being, then.  Or alter the Template name to not begin/end with “index”.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 20 July 2004 07:56 PM   [ Ignore ]   [ # 5 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  05-15-2004

I did wink

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66466 Total Logged-in Users: 28
Total Topics: 84857 Total Anonymous Users: 10
Total Replies: 455317 Total Guests: 170
Total Posts: 540174    
Members ( View Memberlist )