JoyFreak Well-known member Jul 14, 2020 #1 I've been trying to add <xf:if is="$template == 'thread_view'"> <xf:set var="$meta"><meta property="og:type" content="article" /></xf:set> </xf:if> In "metadata_macros" template but it doesn't seem to work.
I've been trying to add <xf:if is="$template == 'thread_view'"> <xf:set var="$meta"><meta property="og:type" content="article" /></xf:set> </xf:if> In "metadata_macros" template but it doesn't seem to work.
arn Well-known member Jul 14, 2020 #2 Looks like you can just pass "type" to metadata_macros in thread_view, find Code: <xf:macro template="metadata_macros" name="metadata" arg-description="{$fpSnippet}" arg-shareUrl="{{ link('canonical:threads', $thread) }}" arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" /> change to Code: <xf:macro template="metadata_macros" name="metadata" arg-description="{$fpSnippet}" arg-type="article" arg-shareUrl="{{ link('canonical:threads', $thread) }}" arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" /> (untested) Upvote 0 Downvote
Looks like you can just pass "type" to metadata_macros in thread_view, find Code: <xf:macro template="metadata_macros" name="metadata" arg-description="{$fpSnippet}" arg-shareUrl="{{ link('canonical:threads', $thread) }}" arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" /> change to Code: <xf:macro template="metadata_macros" name="metadata" arg-description="{$fpSnippet}" arg-type="article" arg-shareUrl="{{ link('canonical:threads', $thread) }}" arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" /> (untested)
JoyFreak Well-known member Jul 14, 2020 #3 arn said: Looks like you can just pass "type" to metadata_macros in thread_view, find Code: <xf:macro template="metadata_macros" name="metadata" arg-description="{$fpSnippet}" arg-shareUrl="{{ link('canonical:threads', $thread) }}" arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" /> change to Code: <xf:macro template="metadata_macros" name="metadata" arg-description="{$fpSnippet}" arg-type="article" arg-shareUrl="{{ link('canonical:threads', $thread) }}" arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" /> (untested) Click to expand... That worked, thank you! Upvote 0 Downvote
arn said: Looks like you can just pass "type" to metadata_macros in thread_view, find Code: <xf:macro template="metadata_macros" name="metadata" arg-description="{$fpSnippet}" arg-shareUrl="{{ link('canonical:threads', $thread) }}" arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" /> change to Code: <xf:macro template="metadata_macros" name="metadata" arg-description="{$fpSnippet}" arg-type="article" arg-shareUrl="{{ link('canonical:threads', $thread) }}" arg-canonicalUrl="{{ link('canonical:threads', $thread, {'page': $page}) }}" /> (untested) Click to expand... That worked, thank you!