diff --git a/frontend/controllers/BlogController.php b/frontend/controllers/BlogController.php index a90ce3c..9c9362a 100644 --- a/frontend/controllers/BlogController.php +++ b/frontend/controllers/BlogController.php @@ -1,9 +1,11 @@ render('index'); + $query = Article::find() + ->with('lang.alias') + ->with('image') + ->where([ 'status' => true ]); + + $dataProvider = new ActiveDataProvider( + [ + 'query' => $query, + ] + ); + + return $this->render( + 'index', + [ + 'dataProvider' => $dataProvider, + ] + ); } } \ No newline at end of file diff --git a/frontend/views/blog/_article.php b/frontend/views/blog/_article.php new file mode 100644 index 0000000..3a2c17f --- /dev/null +++ b/frontend/views/blog/_article.php @@ -0,0 +1,5 @@ + + + diff --git a/frontend/views/blog/index.php b/frontend/views/blog/index.php index a6596ef..c2baff0 100644 --- a/frontend/views/blog/index.php +++ b/frontend/views/blog/index.php @@ -34,41 +34,6 @@

Continue reading

- - -
-

Who is who - example blog post

-
-
-

By John Snow in Webdesign -

-
- -
-
-
- -
- -
-

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean - ultricies mi vitae est. Mauris placerat eleifend leo.

-

Continue reading -

-
- - - @@ -82,38 +47,26 @@ - - + + + + + + + + + + + + + + + + + + +