On 03.08.2009, at 15:19, Thomas Duffey wrote:

On Aug 3, 2009, at 7:38 AM, Will Scheidegger wrote:

On 03.08.2009, at 13:55, Jan Haderka wrote:

On Mon, 2009-08-03 at 10:44 +0200, Will Scheidegger wrote:
What _should_ be the behavior of inherit="true"?
a) Only inherit values from ancestor nodes when node data does not
exist?
b) Inherit from ancestor nodes if node data does not exist OR node
data is empty?

[...] so I'm in favour of a)
(i.e. current functionality)

Thanks for the feedback. I've tested it again and you're right: When I clear out the values in a field of a dialog and then save the dialog, the corresponding node data gets deleted too.... and inheritance works again afterwards. I don't know how I ended up with an empty node data this morning. So forget my post. Option a) works perfectly fine.

What about when inheriting a collection? I have a case where I inherit using the contentNodeIterator tag and if I add content to page and later delete it then it leaves an empty node in the hierarchy. At this point the only way to get inherit to work again is to go into the JCR browser and remove that node. I thought about changing the behavior of the tag to deal with this but also wonder if the empty node should be deleted when the collection no longer has any paragraphs...

Yes, this happened to me to. Here's an idea for a workaround (i.e. ugly hacks) for this problem: - Check the length of the collection _before_ the contentNodeIterator tag.
- I the length is zero, delete the contentNode by scriptlet.
As I said: ugly hack! But it should work since this "cleanup script" will be called when you delete the last item (paragraph) in the content node iterator.

-will


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to