juliocamarero/liferay-portal — pull request #1460 by epgarcia (2013-03-05 19:10:45+00:00)
Title: LPS-33005 A content editor should be able to embed generic templates in all DDM Templates

Hi Julio,

With these changes we replace the old template include variable "journalTemplatesPath" by a generic "templatesPath". The handling of this variable is also simplier, as it only requires the templateId, while the previous one also required companyId and groupId internally, and this prevented users from including global templates.

@juanferrub and I considered to include an upgrade process to replace the occurences of "journalTemplatesPath/oldTemplateId" by "templatesPath/newTemplateId". The provided upgrade process works fine for several use cases (e.g. many includes in the same template, many templates in different groups...). But it only covers those cases where the original include path is like:

$journalTemplatesPath/templateId.

It would not cover cases like:

$journalTemplatesPath/$variableWithTheValueOfTemplateId

because in that case we cannot obtain the old template id directly from the include path (we'd have to search for it within the script).

So the question is: should we upgrade old data and ask our users to check if their includes have been properly updated (for non-typical use cases) or should we not update data and keep backward compatibility with the old include pattern?

Thanks!