Add custom page attributes?

Showing 1-3 of 3 messages
Add custom page attributes? Stuart Axon 9/25/12 3:08 AM
Hello all,
  I want to add template variable that is global to a page, is there a way to do this?

The variable would set a banner image for my template (or default to the default one).

Cheers,
Stuart
Re: Add custom page attributes? Jonas Obrist 9/25/12 4:19 AM
Hi Stuart,

This is not directly possible and currently the most viable workaround is to create a second model holding your custom data with a OneToOne/ForeignKey to Page. Then unregister the PageAdmin and re-register it with an inline attached that hooks your model onto the PageAdmin.

Jonas
Re: Add custom page attributes? Stuart Axon 9/25/12 9:06 AM
Cheers.   In the end we got a ContextProcessor working to do what we needed.