Welcome Guest, Not a member yet? Register   Sign In
Custom tags for my very small cms
#1

[eluser]mysterious[/eluser]
I'm developing a very small cms kind of thing. So far I have a page controller that lets you add pages. And there is a frontend controller. All calls are received by the frontend controller and respective page is displayed. Now I want to allow some custom tags while creating a page. I am using CKEditor and I want that while creating a page user gives a tag like <!--cmsform_printform--> and this tag will print printform method of cmsform controller.

For this I have created a controller cmsform that has a method printform. In my fronend controller I have created a method replace_tags that searches tags and then call respective controller and method.

But then I realized that my logic was false because I should not load a controller in another controller. And I tried helper functions. helper function helped me though but i think i should use helper function when i need to return some simple html.

My situation is bit different. Admin will create a form from admin section. He will choose fields and lables and a form named XYZ will be created and CMS will generate a tag for that form. And when admin will place that tag while creating a page,that tag will be replaced with form. something like cforms in wordpress. want addon feature like wordpress or other big CMSes.

Please guide me how can i achieve this.

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB