<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Merge pade.add and page.edit</title>
		<link>https://www.cotonti.com</link>
		<description>Останні повідомлення в темі</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 09 May 2026 05:04:41 -0000</pubDate>

		<item>
			<title>Kingsley</title>
			<description><![CDATA[<p>
	@ trust. ok, then I am cool with that :)</p>
]]></description>
			<pubDate>Пт, 07 Гру 2012 16:24:59 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=7258&d=0#post36470]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	@Kingsley</p>
<p>
	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.</p>
<p>
	@Macik</p>
<p>
	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.</p>
<p>
	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.</p>
]]></description>
			<pubDate>Пт, 07 Гру 2012 12:51:47 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=7258&d=0#post36469]]></link>
		</item>
		<item>
			<title>Macik</title>
			<description><![CDATA[<p>
	Vote for  «YES», but have several questions…</p>
<p>
	Is there ability to use one function with different TPLs?  I speak about using 2 tpl - one for add and one for edit.</p>
<p>
	Or some compromise solution to pass TPL path as a parameter, so (when we adding a page) first we can check is there separate «add» template, otherwise use standart «edit» one.</p>
<p>
	By the way, is this merge consider any «add/edit.first/tags» hooks? Would it be backwards compatible so old plugins still works?</p>
]]></description>
			<pubDate>Пт, 07 Гру 2012 12:39:09 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=7258&d=0#post36465]]></link>
		</item>
		<item>
			<title>Kingsley</title>
			<description><![CDATA[<p>
	So in the end it will be more work for coders? Meh.. Do not like combined tpl's.. Like the one of the polls; it's a freaking nightmare..</p>
]]></description>
			<pubDate>Пт, 07 Гру 2012 11:25:55 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=7258&d=0#post36463]]></link>
		</item>
		<item>
			<title>lukgoh</title>
			<description><![CDATA[<p>
	I dont see any problem with merging them but keeping 2 different templates for the seperate pages. At least this way it wont confuse new people using the CMF. </p>
]]></description>
			<pubDate>Пт, 07 Гру 2012 10:52:07 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=7258&d=0#post36462]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	Now that page management is <a href="https://github.com/Cotonti/Cotonti/issues/920" rel="nofollow">unified underneath</a>, the functionality of page.add and page.edit is almost identical. Therefore they can be merged to reduce code duplication.</p>
<p>
	Pros:</p>
<ul><li>
		Maintain just page.edit.tpl instead of page.add.tpl and page.edit.tpl.</li>
	<li>
		Reduces code redundancy.</li>
</ul><p>
	Cons:</p>
<ul><li>
		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.</li>
</ul><p>
	What do you think?</p>
]]></description>
			<pubDate>Пт, 07 Гру 2012 10:08:05 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=7258&d=0#post36459]]></link>
		</item>
	</channel>
</rss>