Page 1 of 1

Adding a Home link or icon to the search results page

Posted: Fri Jan 24, 2020 11:43 am
by ckabstein
Hi,

I'm currently investigating where in the Webhelp Responsive plugin I can override or insert additional HTML code to include a return icon or return Home link on the search results page.
We already had a solution for this for the "old" xml.oxygen.webhelp plugin, but the file searchCommon.js was directly altered - which is not the way we would like to go. After several attempts to intregrate this in one way or another, I'm at a dead end now.
Could you tell me please what exactly I need to do to achieve this? Or is the only way to do this by making changes to the original plugin files?

Thanks and best regards,
Christina

Using Oxygen 21.1, DITA OT 3.3.1

Re: Adding a Home link or icon to the search results page

Posted: Mon Jan 27, 2020 1:28 pm
by ionela
Hi Christina,

In the current oXygen XML WebHelp implementation, in the search page if you click on the Publication title you are redirected to the publication home page.
You can check as an example our user manual: Search Results
The Search page layout is described here: Search Page layout

Is this the behavior you need?

Regards,
Ionela

Re: Adding a Home link or icon to the search results page

Posted: Mon Jan 27, 2020 4:24 pm
by ckabstein
Hi Ionela,

Thanks for your answer.
We know that the Publication Title can also be used to get back to the home page. However, in our case this is not obvious.
Our Publication Title is in the top middle of the page and it looks like the subtitle of the product name. So, we cannot expect users to identify this clearly as a return to the home page. We would like to add that link/icon somewhere else.
I'm sending you examples by e-mail.

Thanks,
Christina

Re: Adding a Home link or icon to the search results page

Posted: Fri May 15, 2020 12:21 am
by rjcbop
We're trying to do something similar. In our case, we'd like to hide the auto-generated title and insert a combination title/logo image in the header. That works fine except of course that there's then no link on the search page for returning to the home page. We're wondering if it's feasible to expose the home link breadcrumb on the search page?

Re: Adding a Home link or icon to the search results page

Posted: Fri May 15, 2020 12:56 pm
by ionela
Hi,

In case you need customize WebHelp Responsive output to include a logo in the title area that redirects you to the home page (similar with what we have in our user manual) you can achieve this by setting the following paramters: 'webhelp.logo.image' and 'webhelp.logo.image.target.url'.
For more details please check the instructions from our user manual:
How to Add a Logo Image in the Title Area

Regards,
Ionela

Re: Adding a Home link or icon to the search results page

Posted: Fri May 15, 2020 6:48 pm
by catherine
Hi, Ionela
We have the same request with Christina.

Many users don't know how to back to the home page if they don't get the search result after searching...
If we can add a home link on the search result page, that would be better.

Best regards,
Catherine

Re: Adding a Home link or icon to the search results page

Posted: Mon May 18, 2020 9:42 pm
by rjcbop
Hi Ionela,

Thanks for the response. We're familiar with how to use a logo image and an associated URL but we'd prefer a text-based link since we think it's clearer for our users. Similar to the case for adding a Home breadcrumb link on the search results page, there's also the case where there's a topic (in your published documentation set) which is not included in the TOC but which is linked to from some other topic that is in the TOC. In that case, there's of course no breadcrumb trail for that topic but it seems as if it still could make sense to just have the Home breadcrumb link.

Thanks,
Rich

Re: Adding a Home link or icon to the search results page

Posted: Wed May 20, 2020 11:26 am
by ionela
Hi,

Thank you all for your feedback.
We have an improvement request logged to our issue tracking tool to implement this for a future version of oXygen XML WebHelp. This will be analyzed by our development team. I have added your votes and comments to it.

Regards,
Ionela

Re: Adding a Home link or icon to the search results page

Posted: Tue Jul 14, 2020 11:37 am
by revaljilji
We did this by adding

Code: Select all

var div = document.getElementById('searchResults');
div.innerHTML += '<p></p><a href="index.html">Back to homepage</a>';
in search.js. We do this only if there are no search results and therefore we added this line in the inner else condition in function computeHTMLResult.