Site Search

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 miro   Site Search tags:  search   permalink
1 107

Customizing Template search box


to change css layout of search box:

go to 'project template' tab --> 'template editor' --> 'css' and append this as new line (you can change it with css controls to fit your needs)

 

#search_box{background: #a6a6a6;border: 1px solid #9b9b9b; color: #ffffff;height:22px; padding: 0 7px;border-radius: 2px;margin:8px 32px 8px 8px;}

 

to customize search button: 

 

#search_button{background: #1b1b1b;border: 1px solid #545454;color: #ffffff;position: absolute;right: 7px;top: 8px;width: 24px;height: 24px;border-radius: 2px;}

 

search area (div) can be also customized :

 

#search{background:#d8d8d8;border:1px solid #cacaca;border-radius: 10px;}

 

you can also use images as background...

 

to make search button invisible:

 

#search_button{display:none;}

 

to remove label from search button (in case you use background image), go to language setting tab --> interface labels --> search labels and change label for 'search'

 

 


Print  posted by miro   Site Search tags:  search • customize   permalink
3.8 4

Parameters For Advanced Search (Mysql only)


search query string parameters (required)

 

q     basic query (search for exact word)

qw   all words (search for all words)

qx   exact words(same as q, but used on advanced search form)

qa   any words (search for any of the words)

 

search type parameter (t) (optional)

 

t=a  search whole website (same if t is not specified)

t=m search in all pages in single template menu (menu category)

       when t=m is used, m=menuname  parameter is required (notice: m parameter is case sensitive)

 

t=p  search in single page

       for special pages with category support (blog/podcast/photoblog/shop/lister) you can specify

       optional c=  parameter (category name)  or  cid  (category id)  (notice: c parameter is case sensitive)

 

 

search period parameter (p) (optional)

 

p=0  any time

p=1  last 24h

p=2  last week

p=3  last year

 

notice: p parameter can only be used together with (t) parameter

 

 

(notice: you can replace spaces with + in q,m,c parameters) 

 

example:

documents/search.php?q=ezgenerator&id=142&c=General&t=p 

will search in page with id 142 in category general for string ezgenerator

 

 


Print  posted by miro   Site Search tags:  Search • parameters   permalink
3 3


[home] 1-3 of 3


CATEGORIES



TAGS


RECENT ENTRIES