Accelerated Mobile Pages (AMP) for CMSMS
Accelerated Mobile Pages (AMP) for CMSMS
Is anyone working on an AMP module/implementation for CMSMS?
Re: Accelerated Mobile Pages (AMP) for CMSMS
There's no need for an additional module or implementation. It's only a question of right templating .
Please make a look to this AMP introduction
http://www.sitepoint.com/an-introductio ... pages-amp/
In an easy way there's only a need to add
inside your template head.
But there's no need to create any content two times. You can easy AMP-ify the content .
Wordpress solutions are using mostly on adding "?amp=1" at URL. You can use this for CMSMS similar like canonical URL.
You can read the added value with {$smarty.GET.amp}. Now it should be easy to AMP-ify every template.
For example
Please make a look to this AMP introduction
http://www.sitepoint.com/an-introductio ... pages-amp/
In an easy way there's only a need to add
Code: Select all
<link rel="amphtml" href="__ANY URL_FOR_AMP__">
But there's no need to create any content two times. You can easy AMP-ify the content .
Wordpress solutions are using mostly on adding "?amp=1" at URL. You can use this for CMSMS similar like canonical URL.
Code: Select all
{if isset($canonical)}<link rel='amphtml' href='{$canonical|cat:'&=1'}' />{elseif isset($content_obj)}<link rel='amphtml' href='{$content_obj->GetURL()|cat:'&=1'}' />{/if}
For example
Code: Select all
{if $smarty.GET.amp != 1}
{cms_stylesheet}
{else}
{cms_stylesheet name='amp-style'}
{/if}
Re: Accelerated Mobile Pages (AMP) for CMSMS
Thanks Chandra. Great reply. I'll look at using this approach as my first steps with AMP.
Cheers
Chris
Cheers
Chris