Adding a Home link or icon to the search results page

ckabstein
Posts: 85
Joined: Fri Apr 24, 2015 12:28 pm

Adding a Home link or icon to the search results page

Post by ckabstein » Fri Jan 24, 2020 11:43 am

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
oXygen XML Editor 22.1 build 2020061102
DITA OT 3.4.1

ionela
Posts: 336
Joined: Mon Dec 05, 2011 6:08 pm

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

Post by ionela » Mon Jan 27, 2020 1:28 pm

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
Ionela Istodor
oXygen XML Editor and Author Support

ckabstein
Posts: 85
Joined: Fri Apr 24, 2015 12:28 pm

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

Post by ckabstein » Mon Jan 27, 2020 4:24 pm

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
oXygen XML Editor 22.1 build 2020061102
DITA OT 3.4.1

rjcbop
Posts: 13
Joined: Wed Aug 08, 2018 10:23 pm

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

Post by rjcbop » Fri May 15, 2020 12:21 am

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?

ionela
Posts: 336
Joined: Mon Dec 05, 2011 6:08 pm

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

Post by ionela » Fri May 15, 2020 12:56 pm

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
Ionela Istodor
oXygen XML Editor and Author Support

catherine
Posts: 135
Joined: Fri Nov 10, 2017 8:16 am

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

Post by catherine » Fri May 15, 2020 6:48 pm

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

rjcbop
Posts: 13
Joined: Wed Aug 08, 2018 10:23 pm

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

Post by rjcbop » Mon May 18, 2020 9:42 pm

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

ionela
Posts: 336
Joined: Mon Dec 05, 2011 6:08 pm

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

Post by ionela » Wed May 20, 2020 11:26 am

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
Ionela Istodor
oXygen XML Editor and Author Support

revaljilji
Posts: 17
Joined: Mon Sep 09, 2019 3:07 pm

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

Post by revaljilji » Tue Jul 14, 2020 11:37 am

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.

Post Reply