1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

FAQs category meta description and meta keywords

This commit is contained in:
SecretR
2013-04-01 15:12:15 +03:00
parent e5ded966cc
commit cebe1810a9
6 changed files with 33 additions and 13 deletions

View File

@@ -114,10 +114,25 @@ class plugin_faqs_list_controller extends eControllerFront
$text .= $tp->parseTemplate($FAQ_LISTALL['item'], true);
$prevcat = $rw['faq_info_order'];
$sc->counter++;
if($category) $meta = $rw;
}
$text .= $tp->parseTemplate($FAQ_LISTALL['end'], true);
$text .= $tp->parseTemplate($FAQ_END, true);
// add meta data if there is parent category
if(!empty($meta))
{
$response = $this->getResponse();
if($meta['faq_info_metad'])
{
$response->addMetaDescription($meta['faq_info_metad']);
}
if($meta['faq_info_metak'])
{
$response->addMetaKeywords($meta['faq_info_metak']);
}
}
$this->addTitle(LAN_PLUGIN_FAQS_FRONT_NAME);
$this->addBody($text);