1

We're using DD4T in our project. There's a new request from our client to add something specific in the head/footer tags for one site.

I've tried adding it in a specific page metadata (two text fields) but I'm hesitant to leave the responsibility of displaying what we want to add on a page through content editors adding metadata in every page template.

Is there a way to retrieve a metadata value set within the Root structure group of the a publication when rendering any page underneath the root? Either through direct reference or recursively navigate back to the root.

4

Dd4t has some functionality in the tbbs to merge page metadata with metadata from parent items (structuregroups). In the templates, you can add a tbb called ad inherited metadata to page, and set a parameter called mergeaction.

If you want to see what it does, you can see the code here https://code.google.com/p/dynamic-delivery-4-tridion/source/browse/trunk/dotnet/DD4T.Templates/InheritMetadataPage.cs?r=65

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.