Bug 697375 - RFE -- allow customization of ToC on Publican-generated websites
RFE -- allow customization of ToC on Publican-generated websites
Status: CLOSED CURRENTRELEASE
Product: Publican
Classification: Community
Component: publican (Show other bugs)
2.5
Unspecified Unspecified
unspecified Severity unspecified
: 3.0
: ---
Assigned To: Jeff Fearn
tools-bugs
:
Depends On:
Blocks: 820023
  Show dependency treegraph
 
Reported: 2011-04-17 23:57 EDT by Ruediger Landmann
Modified: 2012-10-30 23:11 EDT (History)
3 users (show)

See Also:
Fixed In Version: 3.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-30 23:11:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ruediger Landmann 2011-04-17 23:57:58 EDT
Publican does not allow any customization of the navigation ToC created for websites.
Comment 1 Jeff Fearn 2011-04-18 01:27:26 EDT
Added site config option toc_type, to allow overriding TOC template.

Name format for template is toc-$type.tmpl, which can be shipped in a brand ot packages some other way.

Added templates/toc-oneline.tmpl as an example of how to do this.
Comment 2 Michael Hideo 2012-06-07 21:31:38 EDT
stand up publican website instance. create a custom toc template. (example in the publican source in git) update website using custom template.
Comment 3 Ruediger Landmann 2012-06-17 19:35:19 EDT
Verified on Publican 3.0-0.t180

[Note for docs: template goes in /usr/share/publican/templates, specified in the site config file without the ".tmpl" filename extension]

But: Publican doesn't let me set either relative or absolute paths to this file. Would it be better to specify paths, so that we avoid any possible collisions when brands install their own tmpl files in /usr/share/publican/templates?
Comment 4 Ruediger Landmann 2012-06-21 02:18:46 EDT
More info:

Setting an absolute path:

toc_type: /opt/local/bogus/dir/toc-min

and updating site gives me:

$ sudo publican update_site
file error - /opt/local/bogus/dir/toc-min.tmpl: absolute paths are not allowed (set ABSOLUTE option)

Setting a relative path:

toc_type: ../opt/local/bogus/dir/toc-min

and updating site gives me:

$ sudo publican update_site
file error - ../opt/local/bogus/dir/toc-min.tmpl: relative paths are not allowed (set RELATIVE option)
Comment 5 Jeff Fearn 2012-06-21 03:00:00 EDT
> Name format for template is toc-$type.tmpl, which can be shipped in a brand
> or packages some other way.

toc_type: foo

Associated template file toc-foo.tmpl in the normal template path.

To change the template path you'd have to set tmpl_path in the website config file and you'd need to override all the other template files.
Comment 6 Ruediger Landmann 2012-06-21 03:07:24 EDT
OK; in that case, working as expected on publican-3.0-0.fc17.t180.noarch

Thanks!

Note You need to log in before you can comment on or make changes to this bug.