which show the bodyText of the node 1282. It works well with docTypes that have bodyText.
If I go to a page with another docType (child of Mastertemplate) who has no bodyText alias (it might have contactEmail alias, or anything else), my umbraco:item doesn't work. The bodyText of 1282 does not appear.
How can I solve that without creating a "bodyText" propertie for all my docTypes?
Naah, after I re-read my above post I didn't think it would work either. But yeah, you could go for the recursive property as well, if you have the bodyText on your homepage or something like that.
Whenever you find the solution to your problem could you post it in here, so that we can see it?
bodyText of another node not showing
Hi guys!
I have this in the footer of my Mastertemplate :
<umbraco:item runat="server" field="bodyText" xslt="umbraco.library:GetXmlNodeById(1282)/data[@alias = 'bodyText']" xsltDisableEscaping="true"/>
which show the bodyText of the node 1282. It works well with docTypes that have bodyText.
If I go to a page with another docType (child of Mastertemplate) who has no bodyText alias (it might have contactEmail alias, or anything else), my umbraco:item doesn't work. The bodyText of 1282 does not appear.
How can I solve that without creating a "bodyText" propertie for all my docTypes?
Try by recursive="true" within the umbraco:item.
Thanks
Pnima
Thank you, but it doesn't work...
Hi Profiterole
I haven't tried something like this using umbraco:item's but maybe you could try giving this a shot:
or this for the legacy XML schema:
As I said I haven't tried this before, and I'm not at all sure that this will work, but it's maybe worth a shot.
Anyway, if I where in you position, I think I would create a small macro for this. Which version of Umbraco are you using?
/Kim Andersen
Hi Kim,
For now I'm using 4.5.2 with legacy mode. I tried your idea. It did not work.
Instead of a macro, I think I'll use a new recursive propertie on my root node.
Thank you for your help.
Naah, after I re-read my above post I didn't think it would work either. But yeah, you could go for the recursive property as well, if you have the bodyText on your homepage or something like that.
Whenever you find the solution to your problem could you post it in here, so that we can see it?
/Kim Andersen
Hi Profiterole,
Try using the NodeId attribute... it's a secret hidden special trick! ;-)
Cheers, Lee.
Damn Lee. That's a very handy ninja trick right there :P
I've never seen that one before - High five!
/Kim A
It's not only a ninja trick, it's a secret hidden ninja trick! As expected, it worked.
Thanks guys!
Lee, this was EXACTLY what I was looking for!!!!
Thank you!
is working on a reply...