1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then 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?

Discussion in 'Showcase Support' started by daveb, Nov 2, 2019.

  1. daveb

    daveb New Member Showcase Showcase 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 ?
     
  2. daveb

    daveb New Member Showcase Showcase Premium

    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 ?
     
  3. Bob

    Bob Developer Staff Member

    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 :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.