* @return void
*/
public function showAction(Tx_Typo3wiki_Domain_Model_Page $page = NULL) {
+ $settings = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
if($page === NULL ) $page = $this->pageRepository->findOneByPageTitle($this->request->getArgument('page'));
if($page === NULL || $page->getMainRevision() === NULL){
if($page === NULL ){
$renderHelper->setPageRepository($this->pageRepository);
$renderHelper->setUriBuilder($this->uriBuilder);
$renderHelper->setSettings($this->settings);
+ $renderHelper->setObjectSettings($this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK));
$renderHelper->setObjectManager($this->objectManager);
return $renderHelper;
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
- // @todo check if __DIR__ has ending slash
require(__DIR__ . '/markdown.php');
class Tx_Typo3wiki_Helper_RenderHelper extends MarkdownExtra_Parser {
/**
protected $settings;
/**
+ * The Controllers Object Settings
+ *
+ * @var array
+ */
+ protected $objectSettings;
+
+ /**
* The ObjectManager
*
* @var Tx_Extbase_Object_ObjectManagerInterface
*/
public function renderRelatedPages(Tx_Typo3wiki_Domain_Model_Page $page) {
foreach ($page->getRelatedPages() as $singlePage) {
- $text = $singlePage->getMainRevision()->getRenderedText();
- $text = $this->renderRelatedPagesHelper($text, $page);
- $singlePage->getMainRevision()->setRenderedText($text);
+ $singlePage->getMainRevision()->setRenderedText('');
+ /*$text = $this->renderRelatedPagesHelper($text, $page);
+ $singlePage->getMainRevision()->setRenderedText($text); */
// @todo check is is saved
}
}
}
/**
- * @todo Adds the rendering of internalLinks to MarkUp
- * @todo tx_typo3wiki_typo3wiki automatically?
+ * Adds the rendering of internalLinks to MarkUp
*
* @param string $text
* @return string
/**
* Adds the rendering of ContentList based on HeadLines to MarkUp
- * @todo Make TOC Template Movable
*
* @param string $text
* @return string
$stageList = $this->_getContentListStage($text, 1);
$tocView = $this->objectManager->create('Tx_Fluid_View_StandaloneView');
$tocView->setFormat('html');
- $tocView->setLayoutRootPath('typo3conf/ext/typo3wiki/Resources/Private/Layouts');
- $tocView->setPartialRootPath('typo3conf/ext/typo3wiki/Resources/Private/Partials');
- $templateRootPath = t3lib_div::getFileAbsFileName( 'typo3conf/ext/typo3wiki/Resources/Private/Templates/Rendering/' );
- $templatePathAndFilename = $templateRootPath .'TableOfContents.html';
- $tocView->setTemplatePathAndFilename($templatePathAndFilename);
+ $tocView->setLayoutRootPath(t3lib_div::getFileAbsFileName($this->objectSettings['view']['layoutRootPath']));
+ $tocView->setPartialRootPath(t3lib_div::getFileAbsFileName($this->objectSettings['view']['partialRootPath']));
+ $tocView->setTemplatePathAndFilename(t3lib_div::getFileAbsFileName($this->objectSettings['view']['templateRootPath']).'Rendering/TableOfContents.html');
$tocView->assign('stageList', $stageList);
return str_replace('{TOC}', $tocView->render(), $text);
}
}
/**
+ * Set objectSettings
+ *
+ * @param array $objectSettings
+ */
+ public function setObjectSettings($objectSettings) {
+ $this->objectSettings = $objectSettings;
+ }
+
+ /**
+ * Get objectSettings
+ *
+ * @return array
+ */
+ public function getObjectSettings() {
+ return $this->objectSettings;
+ }
+
+
+ /**
* Set ObjectManager
*
* @param \Tx_Extbase_Object_ObjectManagerInterface $objectManager