AMP in django CMS pages

36 views
Skip to first unread message

jm rivas

unread,
Oct 20, 2017, 6:16:07 AM10/20/17
to django CMS developers
Hi everyone !

I am trying to include AMP version pages in django CMS. Is there any standard or known way to do this? 

For the plugins I have a context variable "amp" that helps me to choose the template for this one with the get_render_template function.

def get_render_template(self, context, instance, placeholder):
       
if context.get('amp', False):
           
return "my_app/plugins/my_plugin_amp.html"
       
else:
           
return "my_app/plugins/my_plugin.html"


But I can't find a way to tell django CMS to select the template AMP version for the page template as these are saved in the database ¿any idea?

Regards!
Reply all
Reply to author
Forward
0 new messages