I have a module that is named article. It exists in the collowing folder:
- protected
- modules
- article
- controllers
ArticleController.php
- views
-article
articleModule.php
Since I am making a CMS. I have chosen not to use direct links to controllers or actions. This means a call to example.com/article/article/index. Would not work. Since the CMS treats an url request as a page. (So it looks for a page called 'index' with a parents 'article' and 'article'. Such a page does not exist.
The CMS loads blocks for a valid page and for one of this blocks I want to execute the article module. I tried using
Yii::app()->runController($route).
However for this you need a route.
Is it possible to run a module like this so that the module works the same as going to the url example.com/article/article ?
Or if that is not possible. How do I setup the Url Manager so that it can handle pages?. With Clean Urls. Here are some examples:
example.com/join_us
example.com/join_us/contact
example.com/news/
example.com/countries/us/healthcare
The above are pages that the user can create and change. I have wrestled with this for a long time. Normally it would be an easy thing. But Yii makes it very hard. Mostly because a controller or module is linked to going to a route.