protected function compile()
 {
     \Contao\ModuleFaqReader::compile();
     $objFaq = \FaqModel::findPublishedByParentAndIdOrAlias(\Input::get('items'), $this->faq_categories);
     if (null !== $objFaq) {
         $objFaq->viewcount++;
         $objFaq->save();
     }
 }
 protected function compile()
 {
     global $objPage;
     // Get the current faq item
     $objFaqItem = FaqModel::findPublishedByParentAndIdOrAlias(Input::get('items'), $this->faq_categories);
     if ($objFaqItem === null) {
         parent::compile();
     }
     $objPage->canonicalType = $objFaqItem->canonicalType;
     $objPage->canonicalJumpTo = $objFaqItem->canonicalJumpTo;
     $objPage->canonicalWebsite = $objFaqItem->canonicalWebsite;
     if ($objFaqItem->canonicalType == 'self') {
         $objPage->canonicalType = 'external';
         $objPage->canonicalWebsite = Environment::get('url') . TL_PATH . '/' . Environment::get('request');
     }
     parent::compile();
 }