diff --git a/public/include/pages/home.inc.php b/public/include/pages/home.inc.php index aecab054..38e1022d 100644 --- a/public/include/pages/home.inc.php +++ b/public/include/pages/home.inc.php @@ -1,9 +1,19 @@ getAllActive(); +foreach ($aNews as $key => $aData) { + // Transform Markdown content to HTML + $aNews[$key]['content'] = Markdown::defaultTransform($aData['content']); +} // Tempalte specifics +$smarty->assign("NEWS", $aNews); $smarty->assign("CONTENT", "default.tpl"); ?> diff --git a/public/include/pages/news.inc.php b/public/include/pages/news.inc.php deleted file mode 100644 index 38e1022d..00000000 --- a/public/include/pages/news.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -getAllActive(); -foreach ($aNews as $key => $aData) { - // Transform Markdown content to HTML - $aNews[$key]['content'] = Markdown::defaultTransform($aData['content']); -} - -// Tempalte specifics -$smarty->assign("NEWS", $aNews); -$smarty->assign("CONTENT", "default.tpl"); -?> diff --git a/public/templates/mmcFE/global/navigation.tpl b/public/templates/mmcFE/global/navigation.tpl index f9a23f08..c53f61c7 100644 --- a/public/templates/mmcFE/global/navigation.tpl +++ b/public/templates/mmcFE/global/navigation.tpl @@ -15,7 +15,6 @@ {/if} diff --git a/public/templates/mmcFE/home/default.tpl b/public/templates/mmcFE/home/default.tpl index 5e4f403f..a54859db 100644 --- a/public/templates/mmcFE/home/default.tpl +++ b/public/templates/mmcFE/home/default.tpl @@ -1,3 +1,5 @@ -{include file="global/block_header.tpl" BLOCK_HEADER="ThePool Collective"} -

Please head over to our pool page for more details. -{include file="global/block_footer.tpl"} +{section name=news loop=$NEWS} + {include file="global/block_header.tpl" BLOCK_HEADER="{$NEWS[news].header} posted {$NEWS[news].time} by {$NEWS[news].author}"} + {$NEWS[news].content} + {include file="global/block_footer.tpl"} +{/section} diff --git a/public/templates/mmcFE/news/default.tpl b/public/templates/mmcFE/news/default.tpl deleted file mode 100644 index a54859db..00000000 --- a/public/templates/mmcFE/news/default.tpl +++ /dev/null @@ -1,5 +0,0 @@ -{section name=news loop=$NEWS} - {include file="global/block_header.tpl" BLOCK_HEADER="{$NEWS[news].header} posted {$NEWS[news].time} by {$NEWS[news].author}"} - {$NEWS[news].content} - {include file="global/block_footer.tpl"} -{/section}