• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Resolved Can the meta title tag be changed?

daveb

New Member
Showcase
SC Premium
oh and on the same track the meta title tag is
testshop city | mysite Forum

How could I make it testshop reviews | mysite Forum or Reviews of testshop | mysite Forum ?
 
sussed this out by editing a few templates, but I keep getting (1) in the title before what I want, is that something pre included somewhere else ?
 
You MIGHT be able to achieve the result you want to by editing the item view template and passing in custom data via the title argument (altho, that might only apply to the OG title).

Template: xa_sc_item_view

Find:
HTML:
<xf:macro template="metadata_macros" name="metadata"
    arg-description="{$descSnippet}"
    arg-type="article"
    arg-shareUrl="{{ link('canonical:showcase', $item) }}"
    arg-canonicalUrl="{{ link('canonical:showcase', $item) }}"
    arg-imageUrl="{{ $item.CoverImage ? link('canonical:showcase/cover-image', $item) : ($item.Category.content_image ? base_url('styles/default/xenaddons/showcase/category_images/' . {$item.Category.content_image}, true) : '') }}"
    arg-twitterCard="summary_large_image" />

The metadata macro in the metadata_macros accepts the following arguments:

HTML:
<xf:macro name="metadata"
    arg-siteName=""
    arg-title=""
    arg-description=""
    arg-type=""
    arg-shareUrl=""
    arg-canonicalUrl=""
    arg-imageUrl=""
    arg-twitterCard="summary">

As you can see, there is an argument for passing in a TITLE. You simple edit the call to the macro and include passing in a custom title instead of letting XenForo decide the title (which is based on Item Title and Site Name).

Example, here I've modified the xc_sc_item_view template to pass in a custom title to the metadata template.
HTML:
<xf:macro template="metadata_macros" name="metadata"
    arg-title="{{ {$item.title} . ' | ' . {$item.Category.title} . ' | some custom text here' }}"
    arg-description="{$descSnippet}"
    arg-type="article"
    arg-shareUrl="{{ link('canonical:showcase', $item) }}"
    arg-canonicalUrl="{{ link('canonical:showcase', $item) }}"
    arg-imageUrl="{{ $item.CoverImage ? link('canonical:showcase/cover-image', $item) : ($item.Category.content_image ? base_url('styles/default/xenaddons/showcase/category_images/' . {$item.Category.content_image}, true) : '') }}"
    arg-twitterCard="summary_large_image" />

See if that does the trick for you :)
 
Back
Top