Hi Will,

I remember this was discussed during the proposal period for the new 
templating. See:
http://wiki.magnolia-cms.com/display/DEV/Templating+-+Proposal#Templating-Proposal-Inheritance
and
http://wiki.magnolia-cms.com/display/DEV/Templating+-+Proposal?focusedCommentId=50790742#comment-50790742

I made the point that there should be 2 kinds of inheritance:
"inheritAll" and "inheritFirst"
What you describe sounds a lot like "inheritFirst" - you want only the first 
node of a given name, either from the current page, or from an ancestor, if 
available.
Shame this wasn't implemented...

I don't think it is possible to anticipate the needs of every customer with a 
single model for how inheritance works. For example, you only want the 
inherited node to be editable if it comes from the current page. Another 
customer way want different logic. 
My opinion is that magnolia should provide tools to make it easy for us to code 
the "inheritance model" we need for the situation.

 STK provides one model - it represents magnolia's idea of best practices for 
templating / site architecture. However, when it doesn't match the 
requirements, the underlying templating utilities should be powerful enough to 
allow us to code other types of inheritance, without having to implement 
everything in Java ourselves.

Luckily, it isn't too hard to do just using freemarker...

Regards from Vienna,

Richard 


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Will Scheidegger
Gesendet: Freitag, 24. August 2012 09:58
An: Magnolia User-List
Betreff: Re: [magnolia-user] Re: Inherit Stage using custom ftl file in 
Magnolia 4.5.3

Hi Philipp

THANKS for the feedback. 

Correct me if I'm wrong, but if I mark the area as inherited, I will _always_ 
get the parent stage on subpages. However this is not the behavior we need. 

What we want (and what we did in Mag 4.x/STK1.x):
- in edit mode
        - if the page has a stage -> display the stage of the page, _not_ the 
stage of any parent page + display the stage edit bar in order for the user to 
modify and delete the stage
        - if the page has no stage -> display the inherited stage (with info 
where the page was inherited from) + display the edit bar in order for the user 
to insert a stage on the page
- in preview mode
        - if the page has a stage -> display the stage of the page
        - if the page has no stage -> display the inherited page

Cheers,
-will


On 24.08.2012, at 09:48, Philipp Bärfuss (via Magnolia Forums) wrote:

> Hi,
> 
> 1) mgnl.inherit()
> I see and can agree that the mgnl.inherit() could/should? work as in 4.4 by 
> just inheriting everything (nodes, properties, ...).
> 
> 2) inheritance of areas
> The clue in the new templating is that this functionalities like inheritance, 
> auto creation of components, ... are built in features of the areas. 
> 
> What you do is to mark the area as inherited and it will get it. The example 
> in STK for that are: footer, meta navigation, ...
> 
> So in STK if you wanted to inherit the stage in articles you would:
> 1. enable the stage in articles
> 2. enable inheritance in the site's prototype
> 
> Philipp
> 
> --
> Context is everything: 
> http://forum.magnolia-cms.com/forum/thread.html?threadId=7f5f6891-d0d7
> -4ee5-a450-7337e077bb26
> 
> 
> ----------------------------------------------------------------
> For list details, see 
> http://www.magnolia-cms.com/community/mailing-lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/ To 
> unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
> 



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





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

Reply via email to