Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <{* SEO FAQ *}>
- <{if $product}>
- <{if $product->getMetaValue('q1')}>
- <{assign var="counter" value=1}>
- <script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[
- <{section name="i" start=1 loop=11 step=1}>
- <{assign var="qr" value="q"|cat:$counter}>
- <{assign var="an" value="a"|cat:$counter}>
- <{assign var="question" value=$product->getMetaValue($qr)}>
- <{assign var="answer" value=$product->getMetaValue($an)}>
- <{if $question}>
- <{if $counter>1}>,<{/if}>
- {"@type":"Question","name":"<{$question}>","acceptedAnswer":{"@type":"Answer","text":"<{$answer}>"}}
- <{/if}>
- <{math assign="counter" equation=x+1 x=$counter}>
- <{/section}>
- ]}</script>
- <{/if}>
- <{/if}>
- <{if $category}>
- <{if $category->getMetaValue('q1')}>
- <{assign var="counter" value=1}>
- <script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[
- <{section name="i" start=1 loop=11 step=1}>
- <{assign var="qr" value="q"|cat:$counter}>
- <{assign var="an" value="a"|cat:$counter}>
- <{assign var="question" value=$category->getMetaValue($qr)}>
- <{assign var="answer" value=$category->getMetaValue($an)}>
- <{if $question}>
- <{if $counter>1}>,<{/if}>
- {"@type":"Question","name":"<{$question}>","acceptedAnswer":{"@type":"Answer","text":"<{$answer}>"}}
- <{/if}>
- <{math assign="counter" equation=x+1 x=$counter}>
- <{/section}>
- ]}</script>
- <{/if}>
- <{/if}>
- <{if $landing_page}>
- <{if $landing_page->getMetaValue('q1')}>
- <{assign var="counter" value=1}>
- <script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[
- <{section name="i" start=1 loop=11 step=1}>
- <{assign var="qr" value="q"|cat:$counter}>
- <{assign var="an" value="a"|cat:$counter}>
- <{assign var="question" value=$landing_page->getMetaValue($qr)}>
- <{assign var="answer" value=$landing_page->getMetaValue($an)}>
- <{if $question}>
- <{if $counter>1}>,<{/if}>
- {"@type":"Question","name":"<{$question}>","acceptedAnswer":{"@type":"Answer","text":"<{$answer}>"}}
- <{/if}>
- <{math assign="counter" equation=x+1 x=$counter}>
- <{/section}>
- ]}</script>
- <{/if}>
- <{/if}>
- <{if $page}>
- <{if $page->getMetaValue('q1')}>
- <{assign var="counter" value=1}>
- <script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[
- <{section name="i" start=1 loop=11 step=1}>
- <{assign var="qr" value="q"|cat:$counter}>
- <{assign var="an" value="a"|cat:$counter}>
- <{assign var="question" value=$page->getMetaValue($qr)}>
- <{assign var="answer" value=$page->getMetaValue($an)}>
- <{if $question}>
- <{if $counter>1}>,<{/if}>
- {"@type":"Question","name":"<{$question}>","acceptedAnswer":{"@type":"Answer","text":"<{$answer}>"}}
- <{/if}>
- <{math assign="counter" equation=x+1 x=$counter}>
- <{/section}>
- ]}</script>
- <{/if}>
- <{/if}>
- <{if $blogpost}>
- <{if $blogpost->getMetaValue('q1')}>
- <{assign var="counter" value=1}>
- <script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[
- <{section name="i" start=1 loop=11 step=1}>
- <{assign var="qr" value="q"|cat:$counter}>
- <{assign var="an" value="a"|cat:$counter}>
- <{assign var="question" value=$blogpost->getMetaValue($qr)}>
- <{assign var="answer" value=$blogpost->getMetaValue($an)}>
- <{if $question}>
- <{if $counter>1}>,<{/if}>
- {"@type":"Question","name":"<{$question}>","acceptedAnswer":{"@type":"Answer","text":"<{$answer}>"}}
- <{/if}>
- <{math assign="counter" equation=x+1 x=$counter}>
- <{/section}>
- ]}</script>
- <{/if}>
- <{/if}>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement