This means I dont have to REPEAT the choice of what template to use for each nested document type product.
Ex: Page a (with template 1234)
- product1
- product2...
Product 1 and 2 will now use the 1234 template (so far so good). If the template 1234 has rendering of field bodyText the bodyText from products will appear on correct place.
I'm using dynamic templates so just to nest different sub document types that default maps to a template will not do in this very specific case :-/
The problem
But I would like to use something like dynamic properties( or a renderTemplate)
I would like to give Page a a specifik property lets say ProductTemplate (of type Richtext with tinyMCE support)
inside this template I can arrange a dynamic template with placeholder for product properties like Price etc. Simple ex:
<p>Price: [#price]</p>
I have tried using Replace to substitute the output from RenderTemplate with the output from the render template like:
umbraco.library:Replace(umbraco.library:RenderTemplate($pageId,$templateIdToUse),$bodyText,'dynamic text here later on')
But to no avail. :-(
I would like to basicly be able to use something like
Where nodeData would be the current node with bodyText altered to be the renderedTemplate substitution.
This way I could have multiple Product listings with different templates, all product sibblings would use the corrent Base template and the same renderingtempalte.
If going with the above solution I would have to extend the Core library to be able to render a own xmlnode (with umbraco page data) with a specific template, thus being able to alter different page fields.
Help wanted
Suggestions, alternative aproaches? Something that is not as complex as the above stated possible solution?
Use a renderTemplate as a property from parent page in xsltmacro
Umbraco: v 4.0.3
Background
I have a specific need not to use the default mapping of Document type and multiple templates for that document type for a specific Document type.
I have a Document type called Product.
For this document type I would like to steal the parents Template and inject some of the own properties to that template.
I have successfully done this with Umbraco library method RenderTemplate.
This means I dont have to REPEAT the choice of what template to use for each nested document type product.
Ex: Page a (with template 1234)
- product1
- product2...
Product 1 and 2 will now use the 1234 template (so far so good).
If the template 1234 has rendering of field bodyText the bodyText from products will appear on correct place.
I'm using dynamic templates so just to nest different sub document types that default maps to a template will not do in this very specific case :-/
The problem
But I would like to use something like dynamic properties( or a renderTemplate)
I would like to give Page a a specifik property lets say ProductTemplate (of type Richtext with tinyMCE support)
inside this template I can arrange a dynamic template with placeholder for product properties like Price etc.
Simple ex:
I have tried using Replace to substitute the output from RenderTemplate with the output from the render template like:
But to no avail. :-(
I would like to basicly be able to use something like
Where nodeData would be the current node with bodyText altered to be the renderedTemplate substitution.
This way I could have multiple Product listings with different templates, all product sibblings would use the corrent Base template and the same renderingtempalte.
If going with the above solution I would have to extend the Core library to be able to render a own xmlnode (with umbraco page data) with a specific template, thus being able to alter different page fields.
Help wanted
Suggestions, alternative aproaches? Something that is not as complex as the above stated possible solution?
is working on a reply...