Skip to content
Code-Schnipsel Gruppen Projekte
Commit 9d06f606 erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete 0c693ebe a2b9cebb
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -97,6 +97,13 @@
</description>
</setting>
<setting name="useFaqStructuredData" type="checkbox">
<locale group="quiqqer/faq" var="brick.accordion.settings.useFaqStructuredData"/>
<description>
<locale group="quiqqer/faq" var="brick.accordion.settings.useFaqStructuredData.desc"/>
</description>
</setting>
</settings>
</brick>
</bricks>
......
......@@ -158,5 +158,15 @@
<de><![CDATA[Seite mit weiteren Informationen. Wenn ausgewählt, wird der Button "Weitere Einträge" unter der FAQ List <strong>immer</strong> angezeigt.]]></de>
<en><![CDATA[Page with further information. If selected, the "More entries" button will <strong>always</strong> be displayed below the FAQ List.]]></en>
</locale>
<locale name="brick.accordion.settings.useFaqStructuredData">
<de><![CDATA[FAQ Schema Markup aktivieren]]></de>
<en><![CDATA[Use FAQ schema markup]]></en>
</locale>
<locale name="brick.accordion.settings.useFaqStructuredData.desc" html="true">
<de><![CDATA[Wenn die Option aktiviert ist, wird ein JSON-LD Code Snippet generiert. Dadurch kann Google die FAQ Einträgen direkt in der Suchergebnissen einblenden. Mehr zu diesem Thema auf
<a href="https://developers.google.com/search/docs/advanced/structured-data/faqpage" target="_blank">Häufig gestellte Fragen mit strukturierten Daten auszeichnen</a>.]]></de>
<en><![CDATA[If enabled a JSON-LD code snippet will be generated. This allows Google to display the FAQ entries directly in the search results. More on this topic at
<a href="https://developers.google.com/search/docs/advanced/structured-data/faqpage" target="_blank">Mark up your FAQs with structured data</a>.]]></en>
</locale>
</groups>
</locales>
......@@ -26,16 +26,17 @@ class Accordion extends QUI\Control
{
// default options
$this->setAttributes([
'class' => 'quiqqer-faqAccordion',
'order' => 'order_field',
'stayOpen' => true, // if true make accordion items stay open when another item is opened
'openFirst' => true, // the first entry is initially opened
'listMaxWidth' => 0, // positive numbers only, 0 disabled this option.
'max' => 10, // max entries
'parentSite' => null,
'siteType' => 'quiqqer/faq:types/entry',
'showMoreButton' => false,
'moreSite' => ''
'class' => 'quiqqer-faqAccordion',
'order' => 'order_field',
'stayOpen' => true, // if true make accordion items stay open when another item is opened
'openFirst' => true, // the first entry is initially opened
'listMaxWidth' => 0, // positive numbers only, 0 disabled this option.
'max' => 10, // max entries
'parentSite' => null,
'siteType' => 'quiqqer/faq:types/entry',
'showMoreButton' => false,
'moreSite' => '',
'useFaqStructuredData' => false
]);
parent::__construct($attributes);
......@@ -88,7 +89,7 @@ class Accordion extends QUI\Control
if ($showMoreButton || $this->getAttribute('moreSite')) {
if ($this->getAttribute('moreSite')) {
try {
$MoreSite = \QUI\Projects\Site\Utils::getSiteByLink($this->getAttribute('moreSite'));
$MoreSite = \QUI\Projects\Site\Utils::getSiteByLink($this->getAttribute('moreSite'));
$showMoreButton = true;
} catch (QUI\Exception $Exception) {
QUI\System\Log::addInfo($Exception->getMessage());
......@@ -134,10 +135,11 @@ class Accordion extends QUI\Control
}
$Accordion = new QUI\Bricks\Controls\Accordion([
'stayOpen' => \boolval($this->getAttribute('stayOpen')),
'openFirst' => $this->getAttribute('openFirst'),
'listMaxWidth' => $this->getAttribute('listMaxWidth'),
'entries' => $entries
'stayOpen' => \boolval($this->getAttribute('stayOpen')),
'openFirst' => $this->getAttribute('openFirst'),
'listMaxWidth' => $this->getAttribute('listMaxWidth'),
'entries' => $entries,
'useFaqStructuredData' => $this->getAttribute('useFaqStructuredData'),
]);
$this->addCSSFiles($Accordion->getCSSFiles());
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren