XF 2.1 AMP thread version by yourself. Possible?


Well-known member
So, as there is no room for hope any more that AMP will be in xF 2.2, I'd like to investigate possibilities to build it by myself. As I'm not a developer and doesn't know the xF system well, I need some assassinate. I have few questions and would be very thankful for any help & advice.

<link rel="amphtml" href="AMP URL"> tag
Is it possible to insert those tags in certain threads pointing to their amp versions? I'm thinking of using custom tread fields. I have no idea what's that, but I guess I can create a custom field where I can put amp urls. And then in a template put something like "<if:xf that custom field is not empty>$ampUrl</if:xf>
Is it doable or I'm just fantasizing?
<xf:if is="$thread.custom_fields.amp">
<xf:head option="something"><link rel="amphtml" href="{{$thread.custom_fields.amp}}"></xf:head>

not sure what option is used for exactly.

here's an example of usage

<xf:head option="rss_forum"><link rel="alternate" type="application/rss+xml" title="{{ phrase('rss_feed_for_x', {'title': $forum.title})|for_attr }}" href="{{ link('forums/index.rss', $forum) }}" /></xf:head>

edit: oh use {{ }} instead of { } for the variable


Well-known member
AMP has been on its way out for a while now:

Why does it appear that AMP is becoming obsolete?
The short answer is this: nearly everything that AMP can do can be done without it, and without cutting out crucial pieces of infrastructure that marketers use to generate brand messages. Not to mention that most of the web does not load over HTTP/2, which AMP does.

The truth is, you can improve your website’s loading speed without AMP, and with the same amount of effort. It’s also better to fix the root issues for consistently faster and better site performance. AMP is kind of like sticking a band aid on a serious wound: it would be much better to stitch it up and apply antiseptic through structural HTML improvements.

Unless you are a news site, failing to adopt AMP will not result in a drop in your organic rankings, unless your overall site performance is rotten—in that case, Google will swat your rankings down like bad fruit falling from a tree.

Another truth is that there is an ongoing debate as to whether AMP pages truly are faster, or if they just seem faster, which can make a difference to visitors. Recent studies have shown that AMP pages can be slower than non-AMP pages, and by a lot. Most pages only seem to see a one second difference, if any, in loading speed, with one test showing a non-AMP mobile site loading faster than its younger AMP sibling. Sibling rivalries can get ugly, and right now AMP and non-AMP sites are in a weird tie.

Here are just a few reasons why AMP is bad for both the webmasters and the web as a whole.

Disappearing links (and ad revenue)

One of the problems with the Accelerated Mobile Pages concept is that content built utilizing AMP is served up through a cache on Google’s server rather than actually linking to the original page on a publisher’s website. This means that the reader is spending more time on Google’s site and will be seeing Google advertising as opposed to any paid advertising on the content provider’s site. More money for Google, less money for the actual content creator.

Less analytics and more work

Although AMP works with Google Analytics, you have to use a different tag, which can be quite time-consuming. If you don’t include the new tag, you miss out on a ton of analytics information.

Plus, AMP is not particularly easy when it comes to installation. You basically have to do all the coding manually. This puts you before a dilemma: either design your site the way you want it and the way it will convert, and set it up for AMP later, — or disregard conversion and aesthetics and make it an AMP site from the start.

Less control of your content

Because AMP is a stripped-down version of your original content, you are at Google’s mercy when it comes to how (and even if) your content is actually displayed. You give up the overall styling of your page in return for a really quick download. If your site features a lot of video, AMP would not be that beneficial for you as the download time would pretty much remain the same.

Less control of your design​

Basically, Google is “forking” the web into a version of the internet that looks exactly like Google wants. The amount of tags is very limited, so most AMP pages have a very plain look — an custom web development becomes sort of an unrealistic and unnecessary field.

In conclusion, while we can all agree on the fact that a faster mobile web experience is better for everyone — especially since the majority of web surfing is now done via mobile — the costs of implementing AMP may just be too high. If you have a well-designed responsive website with optimized images and video, you really don’t need to worry about AMP.


Well-known member
yeah -- news site is the clear benefit for AMP. though, google says they are going to allow non-amp to be featured in the news carousel in the future.