[MAGNOLIA-2850] Clarify and clean up concepts of "main content", "current content", usage of Resource and AggregationState Created: 18/Aug/09  Updated: 04/Dec/13  Resolved: 04/Dec/13

Status: Closed
Project: Magnolia
Component/s: core, taglibs, templating
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Magnolia International Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-2993 Extract logic out of taglibs - reusab... Closed
is related to MAGNOLIA-2869 taglibs: inheritance in iterator and ... Closed
supersession
supersedes MAGNOLIA-2851 PageIterator tag wrongly iterates ove... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

There are a number of situations where the usage of these is unclear and unspecified.
Clarifying these notions, cleaning up unused code, redundant methods, renaming them properly would help fixing some corner case bugs and getting more consistent/comprehensive behaviour.



 Comments   
Comment by Philipp Bärfuss [ 03/Sep/09 ]

For the clarification:

main content:

  • this is the entry point of the rendering
  • never changed while rendering (we might even through an exception on such attempts)

current content

  • the node we are working on
  • normally a page or paragraph but can be any node (dms, data module)
  • for instance set by the includeTemplate tag

This two global variables are enough. In newer versions of Magnolia one can either pass content objects directly to the tags or work directly on the content.

All other objects like global page, ... are deprecated. Hence we have to:

  • clean up the tag libraries: deprecate all undefined use cases, add warn messages
    • candidates are the following tags: loadPage, pageIterator, set (should only support setting the current content)
  • ensure that tags can take a content attribute where ever it makes sense

It is the goal to;

  • make the main taglibrary slimmer
  • factor out the logic (to make it reusable in other renderers: freemarker, velocity, jruby, ..)
Comment by Jan Haderka [ 04/Dec/13 ]

Old tag libraries have been reworked for Magnolia 4.5 and many old tags and incorrect variables were removed at this point.

Generated at Mon Feb 12 03:40:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.