|Add custom page attributes?||Stuart Axon||9/25/12 3:08 AM|
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).
|Re: Add custom page attributes?||Jonas Obrist||9/25/12 4:19 AM|
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.
|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.