Copied to clipboard

Flag this post as spam?

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


  • Peder Jensen 16 posts 36 karma points
    Jan 22, 2010 @ 09:08
    Peder Jensen
    0

    Shows image id over image from media picker

    Yesterday i made an xslt file, to get and image from media picker, and make that image in to link, to a PDF file also form a media picker.

    It is working fine, but over the image is now the media id from both the image and pdf file, how do i remove it ?

    if you need some data like the xslt file, the just ask.

    Hope you can help.

  • dandrayne 1138 posts 2262 karma points
    Jan 22, 2010 @ 09:38
    dandrayne
    0

    Hi Peder

    You'd probably need to post the xslt file to get a proper look, but by "over the image is the media id" - do you mean the alt text of the image?

    Dan

  • Peder Jensen 16 posts 36 karma points
    Jan 22, 2010 @ 10:12
    Peder Jensen
    0

    here is the xslt :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
     version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:msxml="urn:schemas-microsoft-com:xslt"
     xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
     exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">

    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:param name="currentPage"/>
    <xsl:template match="/">
    <xsl:copy-of select="$currentPage" />
    <!-- are both these properties filled in?  We don't want to get an error -->
    <xsl:if test="string($currentPage/data [@alias='Product1Link']) != '' and string($currentPage/data [@alias='Product1Picture']) != '' ">
     <a href="{umbraco.library:GetMedia($currentPage/data [@alias='Product1Link'], 'false')/data [@alias='umbracoFile']}">
      <img alt="Product">
       <xsl:attribute name="src">
        <xsl:value-of select="umbraco.library:GetMedia($currentPage/data [@alias='Product1Picture'], 'false')/data [@alias='umbracoFile']" />
       </xsl:attribute>
      </img>
     </a>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>

    And i dont now what you mean by alt text, but i have my image, and over it is some numbers, that i fund out was the media id.

  • dandrayne 1138 posts 2262 karma points
    Jan 22, 2010 @ 11:05
    dandrayne
    0

    Your alt text seems to be "product", so when you hover over the image it may appear.

    I can't see from your xslt why image ids would appear "over the image" - do you have a screenshot?

  • Peder Jensen 16 posts 36 karma points
    Jan 22, 2010 @ 11:09
  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jan 22, 2010 @ 11:13
    Peter Dijksterhuis
    0

    Check your template. The XSLT is just fine, it doesn't print out the ID's, so the problem must be somewhere else.

    If you look at the template of the documenttype, is there anything being printed there right before you call the macro?

    HTH,

    Peter

  • Peder Jensen 16 posts 36 karma points
    Jan 22, 2010 @ 11:17
    Peder Jensen
    0

    No i cant see that there is any thing wrong whit the template, but here is the code :

    <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="AUTHOR" content="">
    <meta name="KEYWORDS" content="replace, these, words, that, describe, your, site, and, page, contents, separated, by, commas">
    <meta name="DESCRIPTION" content="Here is where you put a short sentence or two describing this page and it's goals">
    <title>Home</title>
    <link rel="stylesheet" type="text/css" href="/css/Home.css">
    </head>
    <body>

    <div align="center">
      <center>
    <table border="0" cellpadding="0" cellspacing="0" width="672" height="110">
     <tr>
    <td width="672" height="110">
    <img src="/media/146/loge%20resized.png" />
    </td>
    </tr>
    <table border="0" cellpadding="0" cellspacing="0" width="672" height="3">
     <tr>
    <td width="672" height="3">
    <img src="/media/179/topbar.png" />
    </td>
    </tr>
    <table border="0" cellpadding="0" cellspacing="0" width="672" height="600">
        <tr>
          <td width="210" height="246" style="vertical-align:top;">
            <div align="center">
              <table border="0" cellspacing="0" width="198" height="200" cellpadding="1">
                <tr>
                  <td width="198" height="26" bgcolor="">
                    </td>
                </tr>
                <tr id="HomeBotton">
                  <td width="198" height="26"</td>
     <a href="http://www.pdhcestate.com/home.aspx">
     <img id="Homebotton" src="/media/159/homebotton.png" border=0 /></a>
                </tr>
                <tr>
                  <td width="198" height="26"</td>
     <a href="http://www.pdhcestate.com/estates.aspx">
     <img src="/media/164/estatesbotton.png" border="0" /></a>           
     </tr>
                <tr>
                  <td width="198" height="26"</td>
     <a href="http://www.pdhcestate.com/aboutus.aspx">
     <img src="/media/169/aboutusbotton.png" border="0" /></a>           
     </tr>
                <tr>
                  <td width="198" height="26"</td>
     <img src="/media/174/emtybotton.png" />           
     </tr>
                <tr>
                  <td width="198" height="26"</td>
     <img src="/media/174/emtybotton.png" />           
     </tr>
                <tr>
                  <td width="198" height="26"</td>
     <img src="/media/174/emtybotton.png" />           
     </tr>
              </table>
            </div>
          </td>
          <td width="15" height="600" rowspan="3" valign="top">
     <div align="center">
      <table border="0" cellpadding="0" cellspacing="0" width="15" height="600">
     <tr>
      <td width="15" height="600" rowspan="3" valign="top">
      <img src="/media/184/sidebar.png" />
     </td>
      </tr>
      </table>
     <td width="462" height="600" rowspan="3" valign="top">
     <div align="top">
      <table border="0" cellpadding="0" cellspacing="0" width="462" height="600">
      <tr>
      <td width="462" height="600" rowspan="3" valign="top">
      <table border="0" cellpadding="0" cellspacing="0" width="450" height="20">
       <tr>
       <td width="450" height="20" rowspan="3" valign="top">
       </td>
       </tr>
       </table> 
      <table border="0" cellpadding="0" cellspacing="0" width="450" height="140">
       <tr>
       <td width="15" height="140">
       </td>
       <td width="135" height="140">
       <umbraco:Macro Alias="AddData" runat="server"></umbraco:Macro>
       </td>
       <td width="10" height="140">
       </td>
       <td width="135" height="140">
       <umbraco:Macro Alias="AddData1" runat="server"></umbraco:Macro>
       </td>
       <td width="10" height="140">
       </td>
       <td width="135" height="140">
       
       </td>
       <td width="10" height="140">
       </td>
       </tr>
       </table>
       <table border="0" cellpadding="0" cellspacing="0" width="450" height="140">
       <tr>
       <td width="15" height="140">
       </td>
       <td width="135" height="140">
       
       </td>
       <td width="10" height="140">
       </td>
       <td width="135" height="140">
       
       </td>
       <td width="10" height="140">
       </td>
       <td width="135" height="140">
       
       </td>
       <td width="10" height="140">
       </td>
       </tr>
       </table>  
      </td>
      </tr>
      </table>
      </div>
     </div>
     </td>  
     </table>
        </tr>
    <div align="center">
      <center>
      <table border="0" cellspacing="0" width="672" height="3">
        <tr>
          <td width="672" height="3">
     </td>
          </tr>
      </table>
      </center>
    </div>
    </body>
    </html>
     
    </asp:Content>
  • Seth Niemuth 275 posts 397 karma points
    Jan 22, 2010 @ 11:34
    Seth Niemuth
    1

    It is this line because that would make it print out extra stuff... you usually just use copy-of for debugging.

    <xsl:copy-of select="$currentPage" />

    It will just print the ids like this. I just tested it.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jan 22, 2010 @ 11:37
    Peter Dijksterhuis
    0

    Geez, how did I miss that....Well spotted Seth!

  • dandrayne 1138 posts 2262 karma points
    Jan 22, 2010 @ 11:39
    dandrayne
    0

    *Smacks Head* !

  • Peder Jensen 16 posts 36 karma points
    Jan 22, 2010 @ 11:41
    Peder Jensen
    0

    Ohh thank to every one :)

Please Sign in or register to post replies

Write your reply to:

Draft