Jahia in English > Link to specifics...

0 (0 Good)
0 (0 Bad)

Link to specifics search-results

by  . »  2015/01/28 09:15

Hello everyone,

I'm trying to find a way to create a link on my website who redirect to the search-results page for a specific word.

example : Clicking on "more about diagnosis" you are redirected to the "diagnosis" search-results page. You don't need to write "diagnosis" in the search bar.

but I can't find the specific URL. My search-results URL remains the same if I do a research or not.

Thx

.
Number of messages  3
Not registered
0 (0 Good)
0 (0 Bad)

Re: Link to specifics search-results

by  shyrkov »  2015/01/28 09:43

Hello,

in a simple case you could do it as follows, assuming that your search results page node is "search-results" (under your site node):

<c:url var="searchUrl" value="${url.base}${rendeContext.site.path}/search-results.html">

    <c:param name="src_terms[0].term" value="diagnosis"/>

</c:url>

<a href="${searchUrl}" title="more about diagnosis">more about diagnosis</a>

 

Kind regards

Sergiy

  • Re: Link to specifics search-results
    2015/01/28 09:43

    shyrkov <p>Hello,</p> <p>in a simple case you could do it as follows, assuming that your search results page node is &quot;search-results&quot; (under your site node):</p> <p>&lt;c:url var=&quot;searchUrl&quot; value=&quot;${url.base}${rendeContext.site.path}/search-results.html&quot;&gt;</p> <p>&nbsp;&nbsp;&nbsp; &lt;c:param name=&quot;src_terms[0].term&quot; value=&quot;diagnosis&quot;/&gt;</p> <p>&lt;/c:url&gt;</p> <p>&lt;a href=&quot;${searchUrl}&quot; title=&quot;more about diagnosis&quot;&gt;more about diagnosis&lt;/a&gt;</p> <p>&nbsp;</p> <p>Kind regards</p> <p>Sergiy</p>

  • Number of messages  407
    Registration date Jan 28, 2015
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Link to specifics search-results

    by  . »  2015/01/29 13:51

    Thx for your answer Sergiy,

    unfortunatly I don't understand a lot about code. I'm working by parameter mode.

    so when I enter the code you gave me in a HTML source module its doesn't work and when I put it in a link module either.

    can't you explain to me what I have to do with it, if it's not too complicated please ?

    Thx a lot !

    .
    Number of messages  3
    Not registered
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Link to specifics search-results

    by  fpral »  2015/02/04 23:23

    Hello,

    You can add "?src_terms[0].term=diagnosis" at the end of the url of your result page: http://www.mysite.com/search-results.html?src_terms[0].term=diagnosis

    Regards

    Francois

    Francois Pral (fpral)

    Number of messages  21
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page