Jump to content

Recommended Posts

Posted

I am running two blogs on the same installation of MT 3.2, so I wanted to create some alternate search templates (a separate for each blog). I followed the directions here: http://www.sixapart.com/movabletype/docs/3..._templates.html and everything seems to be working, except for if you search again from the search results page (using the new search bar that appears at the top of the page, not the original one in the sidebar), it lists the new search results using theo the default.tmpl file for both blogs. I'm not sure where to edit this setting. The two blogs are:

http://www.aftertastebliss.com

http://www.aftertastebliss.com/natelog

 

While I'm at it - is there any way to use a php include in the alternate search templates? I noticed that it didn't work, so I had to use an MT Include (same with my comment pending, comment error, etc templates) which is less desirable, as my Recent Comments do not show up in the sidebar when using MT Includes.

 

THANKS!

Posted

Step 3 of the instructions you linked to discusses adding a hidden "Template" form field to the search form on your weblog. You've done this on the search form that appears in your weblog's sidebar:

><input type="hidden" name="Template" value="aftertastebliss" />

Searches submitted from the search form on your weblog page will have the results displayed with your alternate template. However, the alternate template also has its own separate search form code. (As you've noted, it's what displays 'the new search bar that appears at the top of the page'.) If you want 2nd and subsequent searches to also use your alternate template to display search results, you need to add the above hidden field to the search form that's in the alternate search template.

 

While I'm at it - is there any way to use a php include in the alternate search templates?

All searches are executed and displayed by mt-search.cgi, and CGI scripts don't process PHP code. There's no way for an alternate template to have any kind of PHP code that would get executed when a search is performed.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...