Responsive WebHelp -- Removing the search bar?

Post here questions and problems related to editing and publishing DITA content.
rminaker
Posts: 27
Joined: Thu Dec 19, 2013 4:34 pm

Responsive WebHelp -- Removing the search bar?

Post by rminaker »

Hi,

Can someone please let me know how to remove the search bar on the Responsive WebHelp?

I did some looking and have a feeling it might have something to do with this file, but anything I comment out seems to cause the transformation to fail. (DITA-OT\plugins\com.oxygenxml.webhelp\templates\dita\bootstrap\wt_search.html).

Any help much appreciated, and thanks!

R.
rminaker
Posts: 27
Joined: Thu Dec 19, 2013 4:34 pm

Re: Responsive WebHelp -- Removing the search bar?

Post by rminaker »

Hi sorry, I forgot to include this in the last post -- but also, if I wanted to move the Search bar, possibly, into one of the placeholder areas shown in this topic, is that possible?

https://www.oxygenxml.com/doc/versions/ ... ation.html

Thanks,

R.
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Responsive WebHelp -- Removing the search bar?

Post by radu_pisoi »

Hi,

The Webhelp Responsive is generated based on a template mechanism.

The Webhelp Responsive generates four type of pages and there is a template file for each one. All Webhelp template files are stored in the templates/dita folder located in the root folder of the oXygen XML WebHelp plugin. The template files are:
  • wt_index.html - Used to generate main page.
  • wt_topic.html - Used to generate HTML pages for each topic.
  • wt_search.html - Used to generate the HTML page for presenting the search result.
  • wt_terms.html - Used to generate the page for index terms.
Please read the next link from user manual for details about the Webhelp template resources:
http://oxygenxml.com/doc/versions/18.0/ ... urces.html

The search component is added in the first three templates pages. So, depending on your needs you have to modify one or all of these templates.

My advice is to copy the existing Webhelp template (bootstrap) and modify the template pages from the duplicate template. To move the search component, open the template file (wt_index.html for instance) in oXygen and move the element 'whc:webhelp_search_input' in the place where you want to be generated.
rminaker wrote:Hi sorry, I forgot to include this in the last post -- but also, if I wanted to move the Search bar, possibly, into one of the placeholder areas shown in this topic, is that possible?

https://www.oxygenxml.com/doc/versions/ ... ation.html
The placeholders can be expanded only to static content, with the content of an HTML file for instance. But you can move the search component near this placeholders and you will obtain the same effect.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rminaker
Posts: 27
Joined: Thu Dec 19, 2013 4:34 pm

Re: Responsive WebHelp -- Removing the search bar?

Post by rminaker »

Hi Radu,

Thanks for this. I was able to figure it out how to remove the search - also thanks for pointing me to that help, it was very useful.

To remove the search form, I commented out this block of code (below). Is there a way to only remove the form itself (and keep the background image)?

The reason I ask is I want to keep the banner. I worked around this by creating an HTML file with a banner image and inserted it in the webhelp.fragment.before.toc_or_tiles parameter, but the code I added to resize the image responsive doesn't work in the published output...

Thanks!

R.


<whc:webhelp_search_input class="navbar-form wh_main_page_search" role="form">
<whc:include_html href="${webhelp.fragment.before.main.page.search}"/>
<div class="wh_welcome"><whc:include_html href="${webhelp.fragment.welcome}"/></div>
<whc:component_content/>
<whc:include_html href="${webhelp.fragment.after.main.page.search}"/>
</whc:webhelp_search_input>
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Responsive WebHelp -- Removing the search bar?

Post by bogdan_cercelaru »

Hello,

To keep the background image and hide the search form from the WebHelp pages you could also use the following CSS:

Code: Select all


#searchForm {
display: none;
}
Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rminaker
Posts: 27
Joined: Thu Dec 19, 2013 4:34 pm

Re: Responsive WebHelp -- Removing the search bar?

Post by rminaker »

It worked great, thanks for that tip. This is a great output. Thanks for adding it to the product!

R.
Post Reply