Description of problem: It would be useful to have a way of customising the site JavaScript found in /usr/share/publican/sitetemplate/toc.js. This could be another site configuration option. A use case for this is when a brand uses client-side chroming utilising require.js to manage the loading of JavaScripts. For everything to be managed by require.js, JavaScripts that use jQuery must be wrapped in a call to require.js. To do this, it needs to be possible to alter the site JavaScripts, such as toc.js.
This requires a few changes, let me know if this is acceptable. The assumption is that you'd do this at the home page/site level and not the brand level. 1: Modify home page to allow site level java-script & templates to be shipped. 2: Add new toc_js attribute to site config. 3: rename toc.js to default.js 4: Modify update_site to make toc.js a sym-link to $toc_js || default.js This wouldn't allow you to do every possible update but it should allow a lot more customization before you really need to start hacking things.
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.
(In reply to Jeff Fearn from comment #8) > This requires a few changes, let me know if this is acceptable. > > The assumption is that you'd do this at the home page/site level and not the > brand level. > > 1: Modify home page to allow site level java-script & templates to be > shipped. > 2: Add new toc_js attribute to site config. > 3: rename toc.js to default.js > 4: Modify update_site to make toc.js a sym-link to $toc_js || default.js > > This wouldn't allow you to do every possible update but it should allow a > lot more customization before you really need to start hacking things. This solution would facilitate the customisation that I require.
Since you can already ship java script in brands it makes sense to expand that to handle templates, and then add an extra site parameter for the relative path to the js file. Much easier to do.
Added site param toc_js. Allow brands to ship 'template' directory. Updated Users_Guide/en-US/Websites_structure_manual.xml with new param. To ssh://git.fedorahosted.org/git/publican.git b525469..e96d576 HEAD -> devel
Hey Katie, I wonder if you could suggest a way for me to verify this one as well?
Hi Tim, I will have to QA this bug. Testing this involves changes to site config. (In reply to Tim Hildred from comment #13) > Hey Katie, > > I wonder if you could suggest a way for me to verify this one as well?
Tested on Publican 3.1.5-0.fc18.t66.
The fix for this bug has been shipped in publican 3.2.0