Copied to clipboard

Flag this post as spam?

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


  • boggyboy 33 posts 22 karma points
    Oct 25, 2009 @ 19:56
    boggyboy
    0

    Help with Creative Package for umbraco 4

    In Warren B's creative package there is a link at the top left of every page.  Its a text based link, and in my case its the name of my site.   I would like to replace the text with an image but still have the link active.  I'm having trouble findiing where in the code to do so.  Any help much appreciated!

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Oct 25, 2009 @ 20:24
    Sebastiaan Janssen
    0

    Do you mean the "Your logo/name" part?

    It in the master template:

     

    <h1 class="flashHeader left">
    <a href="/" title="&laquo; Back to home">
      <umbraco:Item field="siteName" recursive="true" runat="server"></umbraco:Item>
      </a> </h1>
  • boggyboy 33 posts 22 karma points
    Oct 25, 2009 @ 22:43
    boggyboy
    0

    Yes...thats it!.  How would i change it to an image??

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Oct 25, 2009 @ 22:54
    Jan Skovgaard
    0

    You could probably do something like this:

    <h1 class="flashHeader left">
      <a href="/" title="&laquo; Back to home">
     <img <umbraco:Item field="yourImage" insertTextBefore="src=&quot;" insertTextAfter="&quot;" runat="server"></umbraco:Item> />
      </a>
    </h1>

    This requires that you have added an image property to your document type so you can get hold of it. Please note that the src="" attribute has been made a part of the umbraco:item insertion because it is not allowed to write src="<umbraco:item></umbraco:item>". It looks a bit ugly but it works.

    I would probably prefer to get the the image using a XSLT macro and then place the maco inside the <a> element.

    hth

    /Jan

  • 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