Search Template help

General ShopSite user discussion

Search Template help

Postby Richard Ruda » Tue Aug 30, 2005 3:06 pm

I am trying to simply add the Link Graphic from our pages database to the
current search results pages.
Now from this newsgroup (Jim), we understand that the search results page
requires 3 different templates.
1) general page layout,
2) product layout
3) format of the link that points to the search destination page defined in
the edit product info
screen of the backoffice.
Now from what I can see we need to add "PAGE.LinkGraphic"
Now if I go to the custom template section (page section under original
files), there is a file called search_link ; under the product section there
is a file called search_product.
From looking at the code it looks like we have to add the LinkGraphic to the
search_product file, where product pricing, add to cart and so on is listed
but have no clue what code to add exactly and where. Suspect it's only one
line but what about the layout. Or perhpas we need someone to do this for
us?
Thanks
Richard
Richard Ruda
 

Re: Search Template help

Postby jim » Wed Aug 31, 2005 8:21 am

First of all what Search Destination is the product set to use? If the
search destination is MoreInfo the product's MoreInfo link is used and
the Link Template Override field is not used at all.

If the search destination is Page then the link graphic would need to be
put in the template defined in the "Link Template Override:" section on
the Preferences > Search Settings > Search Layout.

The default search_link template looks like this
---------------------------------------------
# <!-- search_link -->
# <!-- this is designed to emulate the appearance of a link from the 7.0
search pages -->

[-- DEFINE LINK_TO_PAGE --]

<a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --][--
SEARCHPRODUCTLINK --]">-
[-- IF PAGE.LinkName --]
[-- PAGE.LinkName --]
[-- ELSE_IF PAGE.Name --]
[-- PAGE.Name --]
[-- END_IF --]
</a>
[-- END_DEFINE LINK_TO_PAGE --]
-----------------------------------------------------
You would need to add something like the following to include the link
graphic as an href
----------------------------
[-- IF PAGE.LinkGraphic --]
<a class="pagelink" href="[-- OUTPUT_DIRECTORY_URL --]/[--
Page.FileName --]"><img [-- PAGE.LinkGraphic REMOVE_HTML --]
align="middle"></a>
[-- END_IF --]
----------------------------
Depending on where you want the graphic to display, this would probably
go right after the line [-- DEFINE LINK_TO_PAGE --]

Jim

Richard Ruda wrote:
I am trying to simply add the Link Graphic from our pages database to the
current search results pages.
Now from this newsgroup (Jim), we understand that the search results page
requires 3 different templates.
1) general page layout,
2) product layout
3) format of the link that points to the search destination page defined in
the edit product info
screen of the backoffice.
Now from what I can see we need to add "PAGE.LinkGraphic"
Now if I go to the custom template section (page section under original
files), there is a file called search_link ; under the product section there
is a file called search_product.
From looking at the code it looks like we have to add the LinkGraphic to the
search_product file, where product pricing, add to cart and so on is listed
but have no clue what code to add exactly and where. Suspect it's only one
line but what about the layout. Or perhpas we need someone to do this for
us?
Thanks
Richard



jim
 

Re: Search Template help

Postby Richard Ruda » Wed Aug 31, 2005 2:10 pm

Jim,
Thanks - it worked perfectly. Appreciate your expertise.
Richard
Richard Ruda
 


Return to User Forum

Who is online

Users browsing this forum: No registered users and 74 guests