Download the package from the manager of your site.
How to download?
The author
Автор дополнения
Version 1.1.1-pl
Release date 10.12.2021
Downloads 133
Views 955
Warning! This component requires PHP version 7.4 or higher! If your site uses PHP less than required, the installation of this package could break it.
Warning! This package requires MODX not less than 2.8 !

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.1.1-pl (12.10.2021)

  • Небольшие правки;

1.1.0-pl (08.10.2021)

  • Небольшие правки;

1.0.9-pl (06.06.2021)

  • Исправлено отображение элемента с модификатором - tag;
  • Плагин не формирует в AMP внутри тега ;

1.0.8-pl (30.12.2020)

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

1.0.7-pl (30.12.2020)

  • Небольшие правки;

1.0.6-pl (29.12.2020)

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