Quote:
Originally Posted by PhilJ
I won't be adding custom FAQ fields for homepage and categories.
Your best bet it to just use plain HTML like this, which also includes microsnippets...
Code:
<div class="details-summary-accordion" itemscope itemtype="https://schema.org/FAQPage">
<details class="my-1" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question" open="open">
<summary class="h4 bg-light border rounded px-3 py-2" itemprop="name">This is Question 1?</summary>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">This is the answer to question 1.</p>
</div>
</details>
<details class="my-1" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary class="h4 bg-light border rounded px-3 py-2" itemprop="name">This is Question 2?</summary>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">This is the answer to question 2.</p>
</div>
</details>
<details class="my-1" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary class="h4 bg-light border rounded px-3 py-2" itemprop="name">This is Question 3?</summary>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<p itemprop="text">This is the answer to question 3.</p>
</div>
</details>
</div>
Which will look like this.
You can of course substitute the questions and answers for language labels.
You can change the CSS styles for details/summary accordions in /skin/reboot/css/utilities.css
|
how to add these codes to each category, please?