This is the code i'm using, the idea is as follows:
I've made a datatype:
Name: 'Banner' Rendercontrol 'ultimate picker' Settings: Ntext, CheckBoxList, and a parentnodeid.
The parentnodeid links to a folder in the 'Content' section. Under this folder we've made all kinds of banners with attributes(Tekst, subject, url, image)
In the 'Base' pages document type, I've added this datatype.
So now when I create a new page, I can select a few banners under the 'banner' tab witch are originating from the folder 'Banners'.
Now here's the problem, I can get (some) values from these banners (as you see in the code, the GetMedia and the NiceUrl works) But for example I can't get the subject from this banner... It's just blank!
So...Anyone have any idea's on what I'm doing wrong?
Well, the obvious thing that leaps out is that you are getting the things that work using $media/field_name, and the thing that doesn't using ./field_name?
think your ./banner_subject expression is not correct, as the '.' refers to the iterated value from the for-each, in your case that would be a nodeId, whereas you're expecting a node (probably from the media section), so shouldn't that be $media/banner_subject?
@Rich Green, this gives the ID numbers of the selected banners
@Rob Watkins, Omg....I've changed it to $media/banner_subject, and it works... Me and my collegue have been working on this for...2-3 hours, and I was quite sure that we tried that...a dozen times...
So I guess I have to say...Thanks! And damn what have we been dumb...Hah!
Ok, as I was writing this, a other question I had has been fixed, and we have NO idea what fixed it...
Sometimes that just happens :o) I spent an entire day last week trying to find a bug in some Javascript that turned out to be putting one line outside a conditional bracket instead of inside it...
Xslt split, can't get data?
Greetings!
I've got a little issue with a site I'm building... I don't really understand the problem at the moment.
(using 4.6.1)
This is the code i'm using, the idea is as follows:
I've made a datatype:
Name: 'Banner'
Rendercontrol 'ultimate picker'
Settings: Ntext, CheckBoxList, and a parentnodeid.
The parentnodeid links to a folder in the 'Content' section. Under this folder we've made all kinds of banners with attributes(Tekst, subject, url, image)
In the 'Base' pages document type, I've added this datatype.
So now when I create a new page, I can select a few banners under the 'banner' tab witch are originating from the folder 'Banners'.
Now here's the problem, I can get (some) values from these banners (as you see in the code, the GetMedia and the NiceUrl works) But for example I can't get the subject from this banner... It's just blank!
So...Anyone have any idea's on what I'm doing wrong?
Well, the obvious thing that leaps out is that you are getting the things that work using $media/field_name, and the thing that doesn't using ./field_name?
At the top of your xslt put this and let us know what the output is
think your ./banner_subject expression is not correct, as the '.' refers to the iterated value from the for-each, in your case that would be a nodeId, whereas you're expecting a node (probably from the media section), so shouldn't that be $media/banner_subject?
Cheers,
/Dirk
@Rich Green, this gives the ID numbers of the selected banners
@Rob Watkins, Omg....I've changed it to $media/banner_subject, and it works... Me and my collegue have been working on this for...2-3 hours, and I was quite sure that we tried that...a dozen times...
So I guess I have to say...Thanks! And damn what have we been dumb...Hah!
Ok, as I was writing this, a other question I had has been fixed, and we have NO idea what fixed it...
Thanks again!
Sometimes that just happens :o) I spent an entire day last week trying to find a bug in some Javascript that turned out to be putting one line outside a conditional bracket instead of inside it...
We call it, the monday-morning effect (even if its wednesday already :) )
is working on a reply...