[opencms-dev] Links on page numbers inside pagination of search page

Mario Jäger m.jaeger at alkacon.com
Wed Aug 4 09:01:16 CEST 2010


Hi Luca,

The class "CmsTemplateSearch", which you use is part of the Template One module. The link to path 
"/system/modules/org.opencms.frontend.templateone/pages/search.html" is hard coded in this class 
(in line 198) in the method "buildSearchLinks()". That is why, you have to change the path either 
in this class itself. But, then it is overwritten when you update that module without your change. 
That is why, it is better to create your own class in another module, which extends the class 
"CmsTemplateSearch" and which overwrites only the method "buildSearchLinks()" with the changed 
link to path "/search/ricera.jsp".

-- 
Kind Regards,
Mario.
 
-------------------
Mario Jäger
 
Alkacon Software GmbH  - The OpenCms Experts                    
http://www.alkacon.com - http://www.opencms.org


Marantelli Luca schrieb:
>
> Hi
>
> I have a search page in Opencms. This page is located in default site, 
> inside folder “search”. In the bottom I have the pagination. this is a 
> part of the code:
>
> List result = cmsSearch.getSearchResults(search);
>
> if (result != null && result.size() > 0) {
>
> // show the result list
>
> out.print(cmsSearch.buildSearchResultList(result));
>
> // show the links to other result pages
>
> out.print(cmsSearch.buildSearchLinks(search));
>
> }
>
> This code generate page numbers with links.
>
> The search is ok, but every page number has a link to the page:
>
> /system/modules/org.opencms.frontend.templateone/pages/search.html?action=search&query=test&matchesPerPage=10&displayPages=10&index=Aree%20professionali&searchRoots=%2F&searchPage=4&uri=%2Fit%2Fsearch%2Fsearch-avanzata.html&__locale=it&entire=false
>
> I don’t want this link but I want that every page goes to page 
> /search/ricerca.jsp. How can I change it?
>
> thanks
>
> *-----------------------------------------------------*
>
> *Luca Marantelli
> **
> Npo Sistemi S.p.A. – Gruppo Npo***
>
> S.S. 11 Padana Superiore 28
> 20063 Cernusco s/Naviglio MI
>
> *Cellulare: +39 3487560072*
>
> Tel.: +39 02 92596.460
>
> Fax: +39 02 92596.317
>
> Mail: lucamarantelli at nposistemi.it <mailto:luca.russo at nposistemi.it>
>
> Web: www.nposistemi.it <http://www.nposistemi.it/>
>
> AVVERTENZE AI SENSI DEL D.LGS. 196/2003 . Il contenuto di questo 
> messaggio (ed eventuali allegati) e' strettamente confidenziale. 
> L'utilizzo del contenuto del messaggio e' riservato esclusivamente al 
> destinatario. La modifica, distribuzione, copia del messaggio da parte 
> di altri e' severamente proibita. Se non siete i destinatari Vi 
> invitiamo ad informare il mittente ed eliminare tutte le copie del 
> suddetto messaggio . The content of this message (and attachment) is 
> closely confidentiality. Use of the content of the message is 
> classified exclusively to the addressee. The modification, 
> distribution, copy of the message from others are forbidden. If you 
> are not the addressees, we invite You to inform the sender and to 
> eliminate all the copies of the message.
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list