I am having trouble getting the following snippet converted to the new schema. It worked great in 4.0, but I just noticed that it does not work on 4.5.2 (I thought I was done converting when i noticed this..) :
Ahh. I knew about replacing the 'node' with '*[@isDoc]", but my syntax was way off. I was trying to use an 'and' statement. There are multiple doc types, so * should be fine.
Thanks to both of you.
Chriztian this is the 2nd time in a month that you have saved me. I couldn't get back into the other post to thank you (kept getting server errors), but you rock!
No worries Jeff - I remember that other one - if you really want to close it though, you can strip everything but the ID from the URL to a post, and access it that way.
4.5.2 Boolean Node ID Test
I am having trouble getting the following snippet converted to the new schema. It worked great in 4.0, but I just noticed that it does not work on 4.5.2 (I thought I was done converting when i noticed this..) :
FYI - target = $currentPage/@id
I have tried replacing everything I could think of, but I am stuck. Anything I do returns nothing. Any ideas?
Thanks in advance.
If you're using the new XML schema then there isn't any <node /> elements any more, the alias of the document type is used.
If you know the document type that it should be you can do this:
If you don't know the alias of the document type (or you just want to match any document types) use this:
Using * will match any document type, and the @idDoc is the attribute placed on a document type level XML element
(Note: The 'and' condition may not be 100% right)
Hi Jeff,
This will do it:
As Aaron (slace) says, it's best to use the Doctype's alias if you know it.
(You don't need the boolean() - that's actually done implicitly in a test attribute)
/Chriztian
Ahh. I knew about replacing the 'node' with '*[@isDoc]", but my syntax was way off. I was trying to use an 'and' statement. There are multiple doc types, so * should be fine.
Thanks to both of you.
Chriztian this is the 2nd time in a month that you have saved me. I couldn't get back into the other post to thank you (kept getting server errors), but you rock!
No worries Jeff - I remember that other one - if you really want to close it though, you can strip everything but the ID from the URL to a post, and access it that way.
/Chriztian
is working on a reply...