Sidebar

startup_tutorial_and_checklist:usability_configuration:seo:meta_tags:meta_for_search_results

Meta For Search Page Results

This page displays only the search results when a search form is submitted. By default the software uses the title module which has not specific title for the search results page page. There are also no specific system generated meta tags. There are not many bits of information usable for meta but the search term used is available within the smarty get variable as all search configurations for the search are passed there:

{$smarty.request.b.search_text}

That will place the search term where ever that tag is placed within that page and/or system template used on that page. Using the above you could place meta and/or title tags like the following:

<title>Search Results for {$smarty.request.b.search_text}</title>
<meta name="title" content="search results for {$smarty.request.b.search_text}">
<meta name="description" content="search results for {$smarty.request.b.search_text}">

You would place the above tags or whatever you create within the html head for that page. By default this page uses the following page template:

/main_page/basic_page.tpl

which will contain the html head to place the above tags. The problem is that page template is used on many pages within the system and the above smarty variable is not available on them. So you have a couple options for adding meta/header tags specifically for use in the seller's other listings page. You can create a copy of the basic_page.tpl template possibly naming it search_results_page.tpl template and then assigning that page template to that page within the following admin tool:

DESIGN > PAGE ATTACHMENTS

You can also use a smarty if tag like the one you find on the general pages meta tag placement support wiki page and simply place a smarty if tag within the current page template assigned to only display tags when the current page is displayed.

Additional Variables

The category id is passed into the page through the following smarty tag:

{$smarty.get.c}

But it will be numeric. Also note that all search criteria are passed the same way. You'll find all "field specific" criteria passed through the following variable:

{$smarty.request.b}

As that is an array you'll need to use the notation described above to get to the variables within that array….like the search term used:

{$smarty.request.b.search_text}

zip code criteria:

{$smarty.request.b.by_zip_code}
{$smarty.request.b.by_zip_code_distance}

optional site wide field:

{$smarty.request.b.optional_field_1}
{$smarty.request.b.optional_field_2}
{$smarty.request.b.optional_field_3}
.....etc

You'll need to test each variables existence before you use it as it may not have been submitted in the search criteria.

startup_tutorial_and_checklist/usability_configuration/seo/meta_tags/meta_for_search_results.txt · Last modified: 2015/06/24 22:43 by geojames