wiki:template:bootstrap3:faq

Bootstrap3 Template

This is an old revision of the document!


FAQ

The landing page is a special page without a sidebar (left and right) and the panel around the content. The landing page is enabled when the current page matches with the doku pages stored in the config landingPages. The default value is (intro) but if you want enable other pages, insert the name with regex syntax. For example:

  • (intro|start), enable the landing pages for all “intro” and “start” pages of every namespaces

The H3~H5 tags are collapsed in TOC and are displayed only during the scroll of the page. This behavior save much space in TOC especially with page with more sections (eg. :wiki:syntax).


The function tpl_pageinfo() does not provide options to remove the name of the page or other customization.

The correct way to remove the page info, is change value to displayPageInfo in Configuration Manager (see: Others configuration).


To implement the Google CSE see this steps (adapted from Google CSE - Implementing search box):

Copy and paste in your meta.html hook this code:

<script>
  (function() {
    var cx = 'YOUR_ENGINE_ID';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//cse.google.com/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>

Select and save the two-page layout in the Google CSE Control Panel. On one page, implement a stand-alone search box, changing the resultsUrl attribute to point to the url where you want to display the results (eg. http://example.org/dokuwiki/search).

Copy and paste this code in the sidebar (or in one of many hooks or in your preferred location):

<gcse:searchbox-only resultsUrl="YOUR_RESULTS_PAGE_URL"></gcse:searchbox-only>

To implement a stand-alone search results page, create a new DokuWiki page (eg. search) and paste the results code snippet into your results page:

<gcse:searchresults-only></gcse:searchresults-only>

Now you can trigger search results on this page by passing a q argument in the url:

http://example.org/dokuwiki/search?q=myQuery

NOTE

If you use the <html> tag, enable the config:htmlok option.


Add text in the cookie banner is simple:

  • Enable the flag showCookieLawBanner in Configuration Manager
  • Create a new DokuWiki page with a text “this site is using cookies, … you have to accept…”. The default DokuWiki page is :cookie:banner
  • Optional, create a policy page (the default DokuWiki page is :cookie:policy)
  • wiki/template/bootstrap3/faq.1444485409.txt.gz
  • Last modified: 9 years ago
  • by Giuseppe Di Terlizzi