Should page.add.tpl and page.edit.tpl be merged?

95% 57
5% 3

60 Date 2012-12-07 10:08

Forums / Cotonti / Core Labs / Ideas / Poll: Merge pade.add and page.edit

Getting rid of redundant code

Trustmaster
#36459 2012-12-07 10:08

Now that page management is unified underneath, the functionality of page.add and page.edit is almost identical. Therefore they can be merged to reduce code duplication.

Pros:

  • Maintain just page.edit.tpl instead of page.add.tpl and page.edit.tpl.
  • Reduces code redundancy.

Cons:

  • If you need different sets of fields for adding and editing a page, you need to use IFs in the template or still make 2 different templates for add and edit.

What do you think?

May the Source be with you!