Nils Breunese ha scritto:
>
> Matteo Pelucco wrote:
>
>> BUT there is also another simpler way.
>>
>> You can add the vars you need extending a dialog.
>> Simply add a new tab to the STK pageDialog. In that tab you can place
>> all the variables you need. They will be left empty by default.
>> In this case, you can avoid to write java code and you will obtain the
>> same result.
>
> I also tried this approach (before actually) and I have another round of
> questions.
>
> 1. For the site-wide statistics settings I added a new tab under
> Templating Kit > Dialog Definitions > pages/home/stkHomeProperties. Does
> that make sense or would you place a dialog for site-wide settings
> elsewhere?
The point 2 is a better option, I think...
> 2. Actually, I only created a reference there and created the actual
> dialog nodes under /modules/<module-name>/dialogs/tabSitestat. Is that
> recommended over putting the tab directly in the STK tree?
Just for sharing purpose.
If you intend to use that tab somewhere else, it is a good practice :-)
So you can include it in stkHomeProperties, stkPageProperties, ...
> 3. Should I export both my dialog definition and the reference to that
> dialog in the STK to XML and put them in the bootstrap resources folder
> for my module? Or can/should that reference be managed by code (in the
> version handler, I guess)?
Bootstrap, of course.
And also version handler for future versions!
> 4. The most important question right now: I can set site-wide settings
> using this dialog, but where do I put the JavaScript code? This code
> should be included in every page and needs to be able to access to these
> settings, so I believe I can't put it under Resources >
> templating-kit/js/all because there I have no access to
> site/page-specific settings. Or am I wrong about that? I would really
> appreciate some guidance on this point.
I think, as Gregory suggested, that you can extend STK main.ftl
including a custom template.
Otherwise you can use the theme capabilities to include extra CSS and
extra JS in headerHTML. Try to extend the POP theme in this way...
HTH,
M.
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------