Lack of interest Various canonical improvements for Resources

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Floren

Well-known member
Canonical URL
Example of proper canonical URL into forums:
http://xenforo.com/community/threads/welcome-to-xf-1-3-assorted-improvements.67121/
http://xenforo.com/community/threads/welcome-to-xf-1-3-assorted-improvements.67121/page-2

Bad canonical URL into Resources:
http://xenforo.com/community/resources/
http://xenforo.com/community/resources/?page=2

We should have this format:
http://xenforo.com/community/resources/page-2

Another example:
http://xenforo.com/community/resources/sub-accounts-by-waindigo.2203/updates
http://xenforo.com/community/resources/sub-accounts-by-waindigo.2203/update?update=7942

We should have this format:
http://xenforo.com/community/resources/sub-accounts-by-waindigo.2203/update-7942

By definition, a canonical URL should not include any session variables, user identifying parameters, or counters.

Canonical and Open Graph data into Templates
I find this very important also. For resource_index:
($category resolves to null, so I kept it for sanity reasons, instead using , '',)
Code:
<xen:title>{xen:phrase resources}</xen:title>

<xen:container var="$head.canonical">
    <link rel="canonical" href="{xen:if '{$page} > 1', {xen:link 'canonical:resources', $category, 'page={$page}'}, {xen:link 'canonical:resources'}}" /></xen:container>

<xen:if is="{$metaDescription}"><xen:container var="$head.description">
    <meta name="description" content="{$metaDescription}" /></xen:container></xen:if>

<xen:container var="$head.openGraph">
    <xen:include template="open_graph_meta">
        <xen:set var="$url">{xen:if '{$page} > 1', {xen:link 'canonical:resources', $category, 'page={$page}'}, {xen:link 'canonical:resources'}}</xen:set>
        <xen:set var="$title">{xen:phrase resource}</xen:set>
        <xen:set var="$description">{$metaDescription}</xen:set>
    </xen:include></xen:container>
And resource_category:
Code:
<xen:title>{$category.category_title}</xen:title>

<xen:container var="$head.canonical">
    <link rel="canonical" href="{xen:if '{$page} > 1', {xen:link 'canonical:resources/categories', $category, 'page={$page}'}, {xen:link 'canonical:resources/categories', $category}}" /></xen:container>

<xen:description class="baseHtml">{xen:raw $category.category_description}</xen:description>

<xen:container var="$head.openGraph">
    <xen:include template="open_graph_meta">
        <xen:set var="$url">{xen:if '{$page} > 1', {xen:link 'canonical:resources/categories', $category, 'page={$page}'}, {xen:link 'canonical:resources/categories', $category}}</xen:set>
        <xen:set var="$title">{$category.category_title}</xen:set>
        <xen:set var="$description">{xen:raw $category.category_description}</xen:set>
    </xen:include></xen:container>
Meta Description
I added a resourceMetaDescription option and edited the ControllerPublic/Resource.php:
Code:
        $categories = isset($categoryList[0]) ? $categoryList[0] : array();
        $metaDescription = XenForo_Application::get('options')->resourceMetaDescription;
...
            'metaDescription' => $metaDescription,
            'activeAuthors' => $resourceModel->getMostActiveAuthors(5),
The description is a required field for Open Graph.
Implementation example:

meta.webp
Result (look at page source):
https://www.axivo.com/resources/

Ideally, a Resources RSS feed should be implemented. Right now the feed is pointing to forums:
Rich (BB code):
<link rel="apple-touch-icon" href="https://www.axivo.com/styles/default/xenforo/logo.og.png" />
<link rel="alternate" type="application/rss+xml" title="RSS feed for AXIVO" href="forums/-/index.rss" />
<link rel="canonical" href="https://www.axivo.com/resources/" />
<meta name="description" content="Linux resources, including offers, services, Red Hat tutorials and more. AXIVO will help you learn your way around terminal." />
<meta property="og:site_name" content="AXIVO" />
<meta property="og:image" content="https://www.axivo.com/styles/default/xenforo/logo.og.png" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.axivo.com/resources/" />
<meta property="og:title" content="Resources" />
<meta property="og:description" content="Linux resources, including offers, services, Red Hat tutorials and more. AXIVO will help you learn your way around terminal." />
Please add these features into next release, thank you.
 
Last edited:
Upvote 3
This suggestion has been closed. Votes are no longer accepted.
Top Bottom