Extending template configuration
--------------------------------
Key: DOCU-328
URL: http://jira.magnolia-cms.com/browse/DOCU-328
Project: Documentation
Issue Type: Task
Security Level: Public
Components: content
Affects Versions: short term
Reporter: Antti Hietala
Assignee: Ruth Stocks
Priority: Major
Write a tutorial that shows how to extend template configuration.
* Use stkArticle as the source. Create a custom template definition that
extends stkArticle.
* Explain how the {{extends}} mechanism works. Link to supporting
documentation. Explain that extending the STK is a recommended best practice.
You should use as much of STK functionality as you can (by extending, not
copying) and define the exception in your own template definition in your own
module.
* Show that some configuration inheritance happens automatically without adding
an {{extends}} node. For example, stkArticle inherits areas from the template
prototype. It only defines {{intro}}, {{content}} and {{contentNavigation}}
areas itself.
* In the custom template definition:
** Set a different {{bodyID}} and explain how it changes the page layout. Link
to supporting documentation.
** Set a {{category}} and explain how it changes template availability.
** Look at the default {{dialog}} property and show that the
{{stkArticleProperties}} dialog already extends {{basePageProperties}}. Extends
is used everywhere!
** Set a {{modelClass}} and explain that a custom model class could provide for
example content related logic such as fetch a contact from the Data module.
Don't go into the detail of implementing the custom class, this is beyond the
scope.
** Keep the {{renderType=stk}}. It has to be {{stk}} if you want to use
features from the STK. And you want to.
** Change the {{subcategory}} to {{news}} (or something else) to demonstrate
how the content gets picked up by the RSS feed component based on the value.
* Use {{extends=override}} in an area, for example to load a different main
area script. Link to documentation that explains where and under what
conditions override works. (You have to extend something first. Cannot override
non-extended configuration such as {{availableComponents}} defined in the
template prototype.)
This request comes from a user.
http://forum.magnolia-cms.com/forum/thread.html?threadId=f7026260-c2d6-4fbb-8547-c89f8487540a
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
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]>
----------------------------------------------------------------