[Hippo-cms7-user] Head contributions in sub-component

Wouter Danes wouter.danes at gmail.com
Wed Oct 5 21:03:24 CEST 2011


Hi Marnix,

Why do you want to do it like this?
There should only be one "head" tag in a html file and it would make the 
most sense to do it in the root component.
What's your use case for this specific need? If you tell us what you 
want to achieve we might be able to help you think of a different solution.
It'd be fairly easy to adjust the hst:headContributions to output stuff 
regardless of level, but you need to take into account that the hst 
renders components from the deepest one up to the root.
You won't be able to access contributions from child components in other 
trees on the graph regardless, the render model just doesn't work like that.

F.ex:

A
+-- AA
|    + --- AAA
+---AB
       +----ABA
       +----ABB

Say you want to write out the head contributions in AA, it'll only see 
the head contributions from the component AAA, not from A, AB, ABA or ABB..

Hst renders the components so that: ABB & ABA are rendered before AB 
which three are rendered before A and AAA is rendered before AA which 
both are rendered before A.

Regards,

Wouter

On 5-10-2011 17:30, marnixkok wrote:
> Hello everyone,
>
> Currently I'm developing a page that needs to output the head contributions
> in the template of a subcomponent. The structure of the page is as follows:
>
> pagecomponent
>    - subcomponent
>      - components that set headcontributions
>
> Unfortunately, the<hst:headContributions />  tag only seems to output
> information on the highest level (pagecomponent), not in subcomponent.
>
> Is there a way in which I can get the output of the tag in the template of a
> subcomponent?
>
> Any help would be much appreciated!
>
> Cheers,
>
> Marnix Kok
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Head-contributions-in-sub-component-tp6862591p6862591.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html




More information about the Hippo-cms7-user mailing list