Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ali Sheikh Taheri 470 posts 1647 karma points c-trib
    Aug 02, 2010 @ 10:57
    Ali Sheikh Taheri
    0

    how can I use umb item with xslt as an attribute in a template?

    how Can I use umbraco Item with xslt as an attribute in a template?

    <a href="<umbraco:Item field='pdfFile' runat='server' xslt='umbraco.library:NiceUrl({0})'></umbraco:Item>" >Click to hear Nicola on Regular Saving</a>

    it doest not work?!!

    Any Idea?

    Thanks in advance

    Ali

  • Bas Schouten 135 posts 233 karma points
    Aug 02, 2010 @ 11:02
    Bas Schouten
    0

    I think this page can help you out: http://umbraco.org/documentation/books/inline-xslt

     

  • Ali Sheikh Taheri 470 posts 1647 karma points c-trib
    Aug 02, 2010 @ 11:24
    Ali Sheikh Taheri
    0

    I have tried that before but didnt work for me 

    Ali

  • wolulcmit 357 posts 693 karma points
    Aug 02, 2010 @ 11:43
    wolulcmit
    0
  • Ali Sheikh Taheri 470 posts 1647 karma points c-trib
    Aug 02, 2010 @ 11:51
    Ali Sheikh Taheri
    0

    Hi tim,

    thanks for ur reply. but I want the node number to be dynamic. something like "pdfFile" node id.

    Cheers

    Ali

     

  • wolulcmit 357 posts 693 karma points
    Aug 02, 2010 @ 12:52
    wolulcmit
    0

    You could do something like this:
    <a href='<%=umbraco.library.NiceUrl(umbraco.presentation.nodeFactory.Node.GetCurrent().Id)%>'>test</a>

    if you really wanted.
    but you'd have to go about reading this post first:
    http://www.delphicsage.com/home/blog.aspx/d=854/title=Code_Expressions_to_Programmaticify_Your_Umbraco_Site

    but it'd be much easier making a small macro for your purposes and use xslt instead.

    - Tim

  • Ali Sheikh Taheri 470 posts 1647 karma points c-trib
    Aug 02, 2010 @ 16:58
    Ali Sheikh Taheri
    0

    I think it's better to make a small macro and it would be much easier. 

    Thanks Tim

  • Tim Arnold 19 posts 39 karma points
    Aug 03, 2010 @ 22:49
    Tim Arnold
    0

    Hi all, in a similar vein, I have been using this inline XSLT to retrieve and display an image

    <umbraco:Item runat="server" field="headImage" xslt="concat('&lt;img src=&quot;', umbraco.library:GetMedia({0},'true')/ data[@alias='umbracoFile'], '&quot; /&gt;')" XsltDisableEscaping="true" />

    headImage is a parameter set in the document type ie it's a Media Picker

    For one of my development sites it works, for localhost it works, but on my other development site, it doesn't.  Any thoughts?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies