I have a problem with RenderTemplate in Umbraco v3.0.6.
I use it to render a template that contains a couple of macro's. But for every macro or page field in the template it wraps it in a div, which looks like this:
[code]
'" style="border: 1px solid #009;">Vi har hermed registreret følgende ordre.[/code]
Why does it do this? And is there any way to avoid it?
Sorry really can't help out, but can at least tell you that this doesn't happen in v4.0.1. I've used renderTemplate also on v3x and cant remember seeing this issue, but it might be my memory failing.
RenderTemplate creates DIV-tags around macros
Hi everyone,
'" style="border: 1px solid #009;">Vi har hermed registreret følgende ordre.[/code]I have a problem with RenderTemplate in Umbraco v3.0.6.
I use it to render a template that contains a couple of macro's. But for every macro or page field in the template it wraps it in a div, which looks like this:
[code]
Why does it do this? And is there any way to avoid it?
/SoerenS
Sorry really can't help out, but can at least tell you that this doesn't happen in v4.0.1. I've used renderTemplate also on v3x and cant remember seeing this issue, but it might be my memory failing.
Fixed it, and apparently there's a bug in RenderTemplate:
If you call it without a template id, ie. RenderTemplate($nodeId), it wraps macro's in DIV's.
If you call it WITH a template id, ie. RenderTemplate($nodeId, 1212), it works without problems.
Daniel, do you mind doing a quick test to see wether this is true in v4 also? So we can get it reported as a bug?
/SoerenS
[quote=SoerenS]
Daniel, do you mind doing a quick test to see wether this is true in v4 also? So we can get it reported as a bug?
/SoerenS[/quote]
Will test later today and report back.
Comment author was deleted
Don't think this will be the same in v4 since it uses a different approach to render the output
I've taken the liberty of creating an issue on it:
http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=22325
Not sure if it is worth the time to fix it though, if it is not a problem in v4. But atleast now it has been reported.
/SoerenS
is working on a reply...