diff --git a/website/apps/frontend/modules/blog/actions/actions.class.php b/website/apps/frontend/modules/blog/actions/actions.class.php index 62510af4a..48e27568d 100644 --- a/website/apps/frontend/modules/blog/actions/actions.class.php +++ b/website/apps/frontend/modules/blog/actions/actions.class.php @@ -16,7 +16,9 @@ class blogActions extends sfActions */ public function executeIndex() { - + $blogPostTable = Doctrine_Manager::getInstance()->getTable('BlogPost'); + + $this->latestBlogPosts = $blogPostTable->retrieveLatest(5); } public function executeView() diff --git a/website/apps/frontend/modules/blog/actions/components.class.php b/website/apps/frontend/modules/blog/actions/components.class.php new file mode 100644 index 000000000..790669a99 --- /dev/null +++ b/website/apps/frontend/modules/blog/actions/components.class.php @@ -0,0 +1,10 @@ +getTable('BlogPost'); + + $this->latestBlogPosts = $blogPostTable->retrieveLatest(5); + } +} \ No newline at end of file diff --git a/website/apps/frontend/modules/blog/templates/_latest_blog_posts.php b/website/apps/frontend/modules/blog/templates/_latest_blog_posts.php new file mode 100644 index 000000000..a34fffa22 --- /dev/null +++ b/website/apps/frontend/modules/blog/templates/_latest_blog_posts.php @@ -0,0 +1,8 @@ +
+

Latest Blog Posts

+ +
\ No newline at end of file diff --git a/website/apps/frontend/modules/blog/templates/indexSuccess.php b/website/apps/frontend/modules/blog/templates/indexSuccess.php index e69de29bb..3e880370e 100644 --- a/website/apps/frontend/modules/blog/templates/indexSuccess.php +++ b/website/apps/frontend/modules/blog/templates/indexSuccess.php @@ -0,0 +1,15 @@ +
+

Doctrine Blog

+ + +
+

getName(), '@blog_post?slug='.$blogPost->getSlug()); ?>

+ +

getBody(); ?>

+
+ +
+ + + $latestBlogPosts)); ?> + \ No newline at end of file diff --git a/website/apps/frontend/modules/blog/templates/viewSuccess.php b/website/apps/frontend/modules/blog/templates/viewSuccess.php index aa6b85a2f..4fbfea5cb 100644 --- a/website/apps/frontend/modules/blog/templates/viewSuccess.php +++ b/website/apps/frontend/modules/blog/templates/viewSuccess.php @@ -4,4 +4,8 @@ - \ No newline at end of file + +

+ + + diff --git a/website/apps/frontend/modules/main/actions/actions.class.php b/website/apps/frontend/modules/main/actions/actions.class.php index 4add2076e..9638f9f0d 100644 --- a/website/apps/frontend/modules/main/actions/actions.class.php +++ b/website/apps/frontend/modules/main/actions/actions.class.php @@ -16,9 +16,6 @@ class mainActions extends sfActions */ public function executeIndex() { - $blogPostTable = Doctrine_Manager::getInstance()->getTable('BlogPost'); - - $this->latestBlogPosts = $blogPostTable->retrieveLatest(5); } public function executeAbout() diff --git a/website/apps/frontend/modules/main/templates/indexSuccess.php b/website/apps/frontend/modules/main/templates/indexSuccess.php index 6b8a6f64f..c624e0e1a 100644 --- a/website/apps/frontend/modules/main/templates/indexSuccess.php +++ b/website/apps/frontend/modules/main/templates/indexSuccess.php @@ -17,12 +17,5 @@ -
-

Latest Blog Posts

- -
+ \ No newline at end of file diff --git a/website/apps/frontend/templates/_menu.php b/website/apps/frontend/templates/_menu.php index 38ba30bf8..2304a9c01 100644 --- a/website/apps/frontend/templates/_menu.php +++ b/website/apps/frontend/templates/_menu.php @@ -4,5 +4,6 @@
  • +
  • \ No newline at end of file