Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
On my page I have a contentPicker called theRecipe, and the target node I selected in this contentPicker has a textstring field called recipeTitle.
In my template I'm trying to do an inline xslt getItem for recipeTitle, like this:
<umbraco:Item field="theRecipe" xslt="umbraco.library:GetItem({0},'recipeTitle')" runat="server"></umbraco:Item>
but this returns nothing. What am I doing wrong?
(I'm using Umbraco v4.7.0.RC)
Could try this.. Sometimes inline code works :P
<%= umbraco.library.GetItem(umbraco.library.GetItem("theRecipe"),"recipeTitle") %>
Sorry, that does not work.
I should be able to do it in the umbraco:Item. But I'm guessing there is something wrong with my xslt snippet.
Hi Martin,
I am not really sure if you can access other nodes than the current via inline xslt, here is what I would try out:
<umbraco:Item field="theRecipe" xslt="umbraco.library:GetXmlNodeById({0})/recipeTitle" runat="server"></umbraco:Item>
If that doesn't work how about creating an Xslt macro for that, or does it need to be inline Xslt?
Cheers,
Sascha
Sascha: That worked great! Thanks alot!
Excellent, good to know that one can do this inline as well. :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Inline xslt getItem?
On my page I have a contentPicker called theRecipe, and the target node I selected in this contentPicker has a textstring field called recipeTitle.
In my template I'm trying to do an inline xslt getItem for recipeTitle, like this:
but this returns nothing. What am I doing wrong?
(I'm using Umbraco v4.7.0.RC)
Could try this.. Sometimes inline code works :P
<%= umbraco.library.GetItem(umbraco.library.GetItem("theRecipe"),"recipeTitle") %>
Sorry, that does not work.
I should be able to do it in the umbraco:Item. But I'm guessing there is something wrong with my xslt snippet.
Hi Martin,
I am not really sure if you can access other nodes than the current via inline xslt, here is what I would try out:
<umbraco:Item field="theRecipe" xslt="umbraco.library:GetXmlNodeById({0})/recipeTitle" runat="server"></umbraco:Item>
If that doesn't work how about creating an Xslt macro for that, or does it need to be inline Xslt?
Cheers,
Sascha
Sascha: That worked great! Thanks alot!
Excellent, good to know that one can do this inline as well. :)
is working on a reply...