You can do the name() thing, but it won't matter - if any of the nodeTypeAliases had spaces in them I *think* they should have been replaced with an underscore ...
The translations are a little bit dependent on the context, but sometimes you just need to see the before & after versions, e.g:
Difference between @nodeTypeAlias and @alias
I am currently working on converting a v4.0 Umbraco site (old schema) to v4.7.1.1 (new schema)
There is LOTS of code in User Controls, classes, etc and this is typical:
xpath = string.Format("//node [@nodeTypeAlias = '{0}' and data[@alias = 'adSpendHeavyweight'] = 1]", Library.GetDocumentTypeAlias("BrandOwner"));
Can I just check how this should be changed to suit the new schema please
Hi Gordon,
This should do it:
/Chriztian
Thanks for the fast reply Chriztian!
So, to make it clear in my mind!!!
@nodeTypeAlias value replaces "node" - could I also do this: /* [name() = '{0}'] (I am concerned that some of the names may contain spaces!!)
data[@alias = 'adSpendHeavyweight'] = 1 converts to "adSpendHeavyweight = 1"
Hi Gordon,
You can do the name() thing, but it won't matter - if any of the nodeTypeAliases had spaces in them I *think* they should have been replaced with an underscore ...
The translations are a little bit dependent on the context, but sometimes you just need to see the before & after versions, e.g:
/Chriztian
Yes, I agree it's a "context" issue but judging by how this project looks I wouldn't be surprised if some nodeTypeAliases had spaces!!
Thanks again for your help.
is working on a reply...