Bug 697375

Summary: RFE -- allow customization of ToC on Publican-generated websites
Product: [Community] Publican Reporter: Ruediger Landmann <rlandman>
Component: publicanAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.5CC: mhideo, mmcallis, publican-list
Target Milestone: 3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-31 03:11:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 820023    

Description Ruediger Landmann 2011-04-18 03:57:58 UTC
Publican does not allow any customization of the navigation ToC created for websites.

Comment 1 Jeff Fearn 🐞 2011-04-18 05:27:26 UTC
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-08 01:31:38 UTC
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 23:35:19 UTC
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 06:18:46 UTC
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 07:00:00 UTC
> 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 07:07:24 UTC
OK; in that case, working as expected on publican-3.0-0.fc17.t180.noarch

Thanks!