Coding Style

Permalink
I am about to embark on upgrading from 5.6 to 5.8 . I have a ton of custom blocks and templates. I started reading the documentation regarding the new coding style guidelines. Is it really necessary to go through all my templates and make sure that indents are 4 spaces, etc? Is there any backward compatibility? I am already facing a lot of work just figuring out how the recode the blocks. Going through all the templates with a fine tooth comb to accommodate the new style guidelines is not how I would like to spend my limited time.

Under the general rules for template it says not to use complex control structures such as if, then, else loops. The site contains data on hiking trails. The data on each trail is contained in a series of relational tables that reside in a mysql database. How content is displayed in my current templates is conditional on variables with the tables. Is the rule regarding control structures indicated as a best practice or is the use of control structures in a template no longer support?

Any insight is sincerely appreciated.

 
mnakalay replied on at Permalink Reply
mnakalay
Hello,

Those guidelines are meant for contribution to the core so unless your code is going to be used in Concrete5's core you don't need to worry about them.

having said so, they are still a good set of guidelines designed to make your code more readable and manageable and several of the rules can actually be automated like spacing for instance and indentation and how brackets are used...
stewblack23 replied on at Permalink Reply
stewblack23
Hey dgreer

Those are just guide lines if you are contributing to core c5 code base as mnakalay said. If you are just doing themeing and add on development its always a good idea to adhere to good coding practices so that other people can pick up code easily.
dgreer replied on at Permalink Reply
Thank you.