nuropa

off the beaten track

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
components:titlebar:index [2025/02/18 14:06] – [Titlebar] admincomponents:titlebar:index [2025/07/19 14:58] (current) – external edit 127.0.0.1
Line 12: Line 12:
  
 What is shown as the main title here is configurable via the “''pageheadline''” option (“What to show in the headline bar of each page?”). What is shown as the main title here is configurable via the “''pageheadline''” option (“What to show in the headline bar of each page?”).
 +
 +==== Site name ====
  
 The default setting is “Site name”, which shows the title specified in the ''[[doku>config:title|title]]'' setting. The default setting is “Site name”, which shows the title specified in the ''[[doku>config:title|title]]'' setting.
 +
 +==== Page name ====
  
 An alternative is to use “Page name” which uses the //first headline// in your page as the title to be shown here. This works similar to DokuWiki’s own [[config:useheading|useheading]] mechanics (which should be configured to “always” for consistency). An alternative is to use “Page name” which uses the //first headline// in your page as the title to be shown here. This works similar to DokuWiki’s own [[config:useheading|useheading]] mechanics (which should be configured to “always” for consistency).
  
-This will then also hide the first ''<h1>'' heading in the page content. It is generally a good practice to start each page with a main headline, but in this case this becomes compulsory.+This will then also hide the first ''%%<h1>%%'' heading in the page content. It is generally a good practice to start each page with a main headline, but in this case this becomes compulsory.
  
 In case the page title can not be determined, this shows the pageId instead (e.g. “components:titlebar:index”). In case the page title can not be determined, this shows the pageId instead (e.g. “components:titlebar:index”).
 +
 +==== Static file ====
  
 The option “Static file” finally allows to use a file hook instead of one of the pre-defined headlines. Use the file name “''title.html''” to provide a static HTML snippet instead. The option “Static file” finally allows to use a file hook instead of one of the pre-defined headlines. Use the file name “''title.html''” to provide a static HTML snippet instead.
  
 +For example, the following snippet:
 +
 +<file html5 title.html>
 + <div style="border:red dashed 1px;">
 +   <h1>Static Headline</h1>
 +   <p class="tagline">This headline is in a static <abbr>HTML</abbr> file.</p>
 + </div>
 +</file>
 +
 +Will end up looking like this:
 +<figure>{{:components:titlebar:titlebar-static-file.png?700|Nuropa titlebar with static title}}<figcaption>A titlebar with a static title</figcaption></figure>
 +
 +Obviously, this makes more sense if it doesn’t just replicate one of the built-in options but if you design a headline that is specific to your site.
 ===== Tagline ===== ===== Tagline =====
  
-The tagline is configured via DokuWiki’s ''[[doku>config:tagline|tagline]]'' option. It is only used if the Page headline (see above) is configured to show the “Site name”.+The tagline is configured via DokuWiki’s ''[[doku>config:tagline|tagline]]'' option. It is only used if the Page headline (see above) is configured to show the “Site name” or “Page name”.
  
  
Line 33: Line 52:
  
 This is managed via the “''youareherepos''” configuration option. This is managed via the “''youareherepos''” configuration option.
 +
 +===== See also =====
 +
 +  * [[banner|Banner bar]]