easy'er use of code generation

5 posts by 2 authors in: Forums > CMS Builder
Last Post: July 27, 2010   (RSS)

Re: [Maurice] easy'er use of code generation

By Jason - July 26, 2010

Hi Maurice,

Do you want to create an include appears in each page that displays the information on a page?

You wouldn't be able to do this, since an include will execute all of its code before executing the rest of the page, so you wouldn't be able to work a template around it.

You would be able to create an include that handles all of your getRecords statements so you don't have to put them at the top of each page.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] easy'er use of code generation

By Maurice - July 26, 2010

Hi jason

your option one would be great why not let cmsb generate 1 php file with all the code of alle the sections both for list an detail page.

I only have to point my php include to that page and focus an adding the field name codes it would spare a lot of time.

hope next cmsb has a great solution for the code generation system

but thanx for your reply

m
-------------------------------------------

Dropmonkey.nl

Re: [Maurice] easy'er use of code generation

By Jason - July 26, 2010

Hi Maurice,

It's not so much a limitation of CMS Builder as it is an issue with php.

There really isn't a way we can create one file that will anticipate different needs for different pages and then insert content dynamically for all sections. If you find that your php code is getting to be a bit much on your pages, look for code that is being repeated across all of your pages, and put that into an include file. This would help clean up your code some.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] easy'er use of code generation

By Maurice - July 27, 2010

aha thats a clear and understanding answer thnx for the insight.
-------------------------------------------

Dropmonkey.nl