Bug 697375 - RFE -- allow customization of ToC on Publican-generated websites
Summary: RFE -- allow customization of ToC on Publican-generated websites
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 2.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.0
Assignee: Jeff Fearn 🐞
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 820023
TreeView+ depends on / blocked
 
Reported: 2011-04-18 03:57 UTC by Ruediger Landmann
Modified: 2012-10-31 03:11 UTC (History)
3 users (show)

Fixed In Version: 3.0.0
Clone Of:
Environment:
Last Closed: 2012-10-31 03:11:25 UTC
Embargoed:


Attachments (Terms of Use)

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!


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