mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 09:34:54 +02:00
Experimental schema template added to FAQs.
This commit is contained in:
@@ -419,7 +419,7 @@ class faq
|
||||
$FAQ_LISTALL['end'] = str_replace($tsrch,$trepl, $FAQ_LISTALL['end']);
|
||||
}
|
||||
|
||||
|
||||
$schemaItems = [];
|
||||
foreach ($data as $rw)
|
||||
{
|
||||
$rw['faq_sef'] = eHelper::title2sef($tp->toText($rw['faq_question']),'dashl');
|
||||
@@ -428,7 +428,7 @@ class faq
|
||||
|
||||
if(!empty($schemaTemplate['item']))
|
||||
{
|
||||
$schema .= $tp->parseSchemaTemplate($schemaTemplate['item'],false,$sc);
|
||||
$schemaItems[] = $tp->parseSchemaTemplate($schemaTemplate['item'],false,$sc);
|
||||
}
|
||||
|
||||
if($sc->item == $rw['faq_id'])
|
||||
@@ -452,6 +452,12 @@ class faq
|
||||
$prevcat = $rw['faq_info_order'];
|
||||
$sc->counter++;
|
||||
}
|
||||
|
||||
if(!empty($schemaItems))
|
||||
{
|
||||
$schema .= implode(",", $schemaItems);
|
||||
}
|
||||
|
||||
$text .= ($start) ? $tp->parseTemplate($FAQ_LISTALL['end'], true, $sc) : "";
|
||||
|
||||
if(!empty($schemaTemplate['end']))
|
||||
|
Reference in New Issue
Block a user