how to call a video which is a child of $CurrentPage
How do I render out my video if the page I'm a parent of the video I want to render: i.e I have a video doctype that takes a url parameter I through using recursive=true might work but no dice.
I now have a very ugly: <xsl:value-of select="umbraco.library:RenderMacroContent('<?UMBRACO_MACRO
macroAlias="uTube.ChromelessPlayer"
uTubeVideo="videoId"
uTubeWidth="185" uTubeHeight="130"
></?UMBRACO_MACRO>', @id)" disable-output-escaping="yes" />
how do I now get it recognise that videoId is a variable and not part of the string :)
You are meant to be able to pass it the ID of the node to render the control on behalf of (ie the child page) so you should be able to leave the value as [#videoId] but I beleive the "passing in the page id" thing doesn't really do anything, so yea, I think you best bet is to concat the string.
how to call a video which is a child of $CurrentPage
How do I render out my video if the page I'm a parent of the video I want to render:
i.e I have a video doctype that takes a url parameter
I through using recursive=true might work but no dice.
<umbraco:Macro uTubeVideo="<umbraco:Item useIfEmpty='videoId' recursive='true' runat='server'></umbraco:Item>" uTubeWidth="185" uTubeHeight="130" Alias="uTube.ChromelessPlayer" runat="server"></umbraco:Macro>
can you call a macro from another XSLT instead?
I'm probably doing it all arse about face :)
- Tim
Hey,
Would this not work?
This uses the advanced macro syntax to do a recurisve property lookup.
http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax
Matt
That works if I'm rendering from that page... i.e: http://localhost/home/screencast?alttemplate=home
but not if I'm where I want to be at http://localhost/
any ideas?
Ahhh, sorry, you want the video of a child element.
I'd probably create a macro that does the look downwards, and use umbraco.library:RenderMacroContent to render out the macro:
http://en.wikibooks.org/wiki/Umbraco/Reference/umbraco.library/RenderMacroContent
Matt
Sweet, thanks Matt...
I now have a very ugly:
<xsl:value-of select="umbraco.library:RenderMacroContent('<?UMBRACO_MACRO macroAlias="uTube.ChromelessPlayer" uTubeVideo="videoId" uTubeWidth="185" uTubeHeight="130" ></?UMBRACO_MACRO>', @id)" disable-output-escaping="yes" />
how do I now get it recognise that videoId is a variable and not part of the string :)
do I have to do a concat?
I wish there was a
or something :)
Hehe, it would be easier =)
You are meant to be able to pass it the ID of the node to render the control on behalf of (ie the child page) so you should be able to leave the value as [#videoId] but I beleive the "passing in the page id" thing doesn't really do anything, so yea, I think you best bet is to concat the string.
Matt
Oh, it works. yipee!
nice to know for furture reference.
Thanks Matt
No problem,
Glad I was off use =)
Matt
is working on a reply...