Question

Django-CMS custom plugins and navigation extenders allow to create any content HTML in some part of the HTML . However I frequently have some JavaScripts required for some specific plugins, like a photo album viewer plugin that requires a JS in the .

My current solution is to let the user specify a specific template for that. I could do some checking in the template render() to use a specific placeholder or use placeholder restrictions but that doesn't seem right: It's still in the "body" placeholder.

Any suggestion?

Was it helpful?

Solution

Nothing wrong with including Javascript in the body - in fact, some consider it best practice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top