Customization of site search result page layout


Site search returns results in certain format - list of results, each with title set as link to the corresponding page in the site, content excerpt, date and url.

 

If you want to customize this default layout:

  • add normal page in EZGenerator
  • in the Treeview, right click on page and select "Use page as search template"


  • open Page Settings panel and check Hide in Menu, uncheck Hide in sitemap
  • open Macros Field panel and drag-and-drop the macros you need

 

Example (Notice : you can also load example layout via right-click --> load page template -> search template)

 

<SEARCH_BODY>

%HEADER%
%NAVIGATION%
%SEARCH_OBJECT(%counter% %title%

%content%

%date[dddd, mmmm d, yyyy]%

% category%
%url%

)%
%GENERATEDTIME%

 

 

%HEADER% will parse --> Results: searchstring

%NAVIGATION% will parse --> 1 2 3                    1 of 18 pages navigation

%SEARCH_OBJECT will parse short data for each page in result

%counter% --> number of page results

%title% --> page title of result

%date% --> last modification date of result page

% category% --> in case of blog, photoblog, podcast this parameter will parse post category; in case of other page - will pars ethe menu category

%url% --> url of the result page  --> this is url macro, to use it select any text or macro, make it hyperlink and use %url% as url for this hyperlink

%GENERATEDTIME% will parse --> Page generated in xxx seconds

 

If you have enabled Advanced search, you can also insert %ADVANCED_SEARCH_LINK% or %ADVANCED_SEARCH% macros.

The first one will build link to advanced search screen, the second one will directly insert advanced search form in the page.


Print  posted by   Site Search tags:  search   
1 107




CATEGORIES



TAGS


RECENT ENTRIES