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
#36469 2012-12-07 12:51

@Kingsley

No, it's different from polls. Polls actually have several templates mixed in 1 file. What we propose here is having 1 template (1 MAIN block) for both adding and editing. Which is less work for coders.

@Macik

Yes, support for pade.add.tpl still should be there if the template exists. But by default it would fall back to page.edit.tpl otherwise.

As for hooks, I think they still should be different because some actions are done when a page is added for the first time but not when editing, and vice versa. But e.g. page.add.tags and page.edit.tags can be merged. In other words, each hook needs individual consideration.

May the Source be with you!