Generates content in AMP
Download the package from the manager of your site.
How to download?
The author
Автор дополнения
Version 1.0.8-pl
Release date 02.13.2021
Downloads 6
Views 20
Warning! This component requires PHP version 5.6 or higher! If your site uses PHP less than required, the installation of this package could break it.

A simple AMP plugin for switching and automatically forming into a simple page. To automatically change the page, a Library was implemented: AMP PHP Library.

System Settings

googleAmpModx_cache — Caching for AMP content;
[by default: Yes ]

googleAmpModx_get — Request Name;
[by default: amp ]

googleAmpModx_template — AMP default template, if no id is specified in the request;
[by default: 0 ]

googleAmpModx_warnings — Print the result in the Error Log.
[by default: No ]

Instruction manual

1. Creating an AMP Page Template:

<!DOCTYPE html>
<html amp lang="ru">
    <meta charset="utf-8">
	<link rel="canonical" href="/">
	<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
	<style amp-boilerplate> 
		body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{ visibility:hidden}to{ visibility:visible}}@-moz-keyframes -amp-start{ from{ visibility:hidden}to{ visibility:visible}}@-ms-keyframes -amp-start{from{ visibility:hidden}to{ visibility:visible}}@-o-keyframes -amp-start{ from{ visibility:hidden}to{ visibility:visible}}@keyframes -amp-start{ from{visibility:hidden}to{visibility:visible}}
	<noscript><style amp-boilerplate>body{ -webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
	<script async src=""></script>
    <script async custom-element="amp-sidebar" src=""></script>
    <script async custom-element="amp-iframe" src=""></script>
    <script async custom-element="amp-youtube" src=""></script>
	<amp-sidebar id="sidebar" layout="nodisplay">
		<div role="button" on="tap:sidebar.close" tabindex="5" class="close">×</div>
			<li role="navigation" tabindex="1"><a href="/" title="Главная страница">Главная страница</a></li>
	<div id="header" class="clearfix">
		<a href="[[++site_url]]" title="[[*pagetitle:escape]]">
			<amp-img src="[[++site_url]]logo.svg" alt="[[*pagetitle:escape]]" width="200" height="40" style="float:right"></amp-img>
		<div role="button" on="tap:sidebar.toggle" tabindex="0" id="ham">☰</div>
	<div style="margin: 10px;">
	<div id="footer">

2.If you have one template, then add the request ?amp to the link, do not forget to change the System Settings — id of the AMP template:

<link rel="amphtml" href="">
<link rel="canonical" href="" />

Or if you have several templates, then add the request ?amp=14 to the link (14-id template):
<link rel="amphtml" href="">
<link rel="canonical" href="" />

3. In the file robots.txt allow indexing of AMP pages:

Allow: *?amp

PHP Library-AMP PHP Library

1.0.8-pl (30.12.2020)

  • Добавлен параметр в Системные настройки;
  • Добавлен modParser;

1.0.7-pl (30.12.2020)

  • Fix

1.0.6-pl (29.12.2020)

  • Релиз;
  • Добавлено 2 параметра в Системные настройки;
  • Небольшие исправление.