Plugins

mkp_if_amp

mkp_if_amp

This conditional tag examines the url of the current page and determines if the url ends in ‘amp.’ This allows for a custom page to be rendered using the standards for Google’s Accelerated Mobile Pages Project.

Links

mkp_if_amp

Attributes

None

Examples

You will want some code similar to this in your individual article template header so that the amp page can be properly detected.


<txp:if_individual_article>
 <link rel="canonical" href="<txp:permlink />">
 <link rel="amphtml" href="<txp:permlink />/amp/">
</txp:if_individual_article>

You will want something similar to this in your individual article template to display the alternative formatting.


<txp:mkp_if_amp>
 <txp:output_form form="layout_archives_amp" />
<txp:else />
 <txp:output_form form="layout_archives_standard" />
</txp:_mkp_if_amp>

Release History

Version 1.0: March 24th, 2016

mkp_version

mkp_version

use to show the current version number.

Attributes: None

mkp_generator

use to show a meta name generator tag.

Attributes: None

mkp_if_version

A Conditional tag that compares the current version against a submitted value.

Attributes

version

Examples


<txp:mkp_version />

<txp:mkp_generator />

<txp:mkp_if_version version="4.6.2"><meta name="Textpattern" content="Current: <txp:mkp_version />" /><txp:else /><meta name="Textpattern" content="Classic: <txp:mkp_version >" ></txp:if_version>

~~~~~~~~~~~~~~~~~~~~~ {.html #example-1}

### Release History

Version 1.0: July 10th, 2015

Version 1.1: June 6th, 2016 (Updated 4.6 Tag Registry to later version)

Version 1.2: February 28th, 2017 (Bug fixes; add <txp:mkp_generator /> )