I would like to create some sort of CMS for myself, but I don't know if this is possible. For example when user requests a page : somesite.com/en/topic1/topic2/topic3/news/show/2
I would like to locate some page controller, that will recoginze that this what i have to render is in english (en), and that page is topic1/topic2/topic3. Than this page controller would go to database and take a look what widgets/controllers are on that page. in this situation I have news MVC, so I activate show action on news controller and return view to my page controller. On the same page i can have other controllers (for eg. voting poll controller/widget).
So basically my question is if I can call other controller from controller and take back it's rendered output. ??
Should I use widgets for this? Articles widget, voting poll widget, menu widget... ? But then I need only one Controller on site...
Page 1 of 1
CMS Development
#2
Posted 04 January 2010 - 08:50 AM
bojanv55, on 04 January 2010 - 07:03 AM, said:
I would like to create some sort of CMS for myself, but I don't know if this is possible. For example when user requests a page : somesite.com/en/topic1/topic2/topic3/news/show/2
I would like to locate some page controller, that will recoginze that this what i have to render is in english (en), and that page is topic1/topic2/topic3. Than this page controller would go to database and take a look what widgets/controllers are on that page. in this situation I have news MVC, so I activate show action on news controller and return view to my page controller. On the same page i can have other controllers (for eg. voting poll controller/widget).
So basically my question is if I can call other controller from controller and take back it's rendered output. ??
Should I use widgets for this? Articles widget, voting poll widget, menu widget... ? But then I need only one Controller on site...
I would like to locate some page controller, that will recoginze that this what i have to render is in english (en), and that page is topic1/topic2/topic3. Than this page controller would go to database and take a look what widgets/controllers are on that page. in this situation I have news MVC, so I activate show action on news controller and return view to my page controller. On the same page i can have other controllers (for eg. voting poll controller/widget).
So basically my question is if I can call other controller from controller and take back it's rendered output. ??
Should I use widgets for this? Articles widget, voting poll widget, menu widget... ? But then I need only one Controller on site...
You can render the different sections with partials or you can use widgets for the different sections
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";
python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]
ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}
You say Tomato, I say Tomato.
Share this topic:
Page 1 of 1

Help












