You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org> on 2007/03/08 01:18:27 UTC
[jira] Closed: (VELOCITY-4) Macros from separate templates conflict
[ https://issues.apache.org/jira/browse/VELOCITY-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henning Schmiedehausen closed VELOCITY-4.
-----------------------------------------
> Macros from separate templates conflict
> ---------------------------------------
>
> Key: VELOCITY-4
> URL: https://issues.apache.org/jira/browse/VELOCITY-4
> Project: Velocity
> Issue Type: Bug
> Components: Build
> Affects Versions: 1.0-Release
> Environment: Operating System: All
> Platform: PC
> Reporter: Andriy Rozeluk
> Assigned To: Velocity-Dev List
>
> We have two templates, which each parse a third template (called style.vm)
> which we put in the top of every template we create.
> style.vm has some basic variables declared in there to define colours and other
> such layout-related things, nothing major. No macros.
> The two templates, however, have more code including macros.
> What I've noticed is that these two templates can't declare macros with the
> same names. In other words, if I create a macro in one of them with a certain
> name, ex VELOC, then I can't create a macro VELOC in the other template,
> because it'll do what the first one does. My impression, though, is that these
> templates should have their own namespace because they don't include each
> other. They do, however, include the common "style.vm" I mentioned, which might
> be the issue.
> This one showed up because we did in fact create two different macros (in two
> templates that have nothing to do with each other) of the same name, and one of
> them was showing the wrong information. Changing the macro name fixed the
> problem as a workaround, but managing this when we're planning to have hundreds
> of templates is not an option. Each template should have its own macro
> namespace to prevent conflicts like this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org