Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 07, 2011 @ 13:05
    Ismail Mayat
    0

    cannot see preview

    using latest version of this datatype with 4.7 i can add items etc however i cannot see the added items unless i click on edit.

    Anyone else get this?

    Regards

    Ismail

  • aghy 129 posts 308 karma points
    Jul 07, 2011 @ 13:11
    aghy
    0

    Hi Ismail,

    The latest version uses an xslt to describe the way it should be displayed for the content editor. You should have an xslt called MultiType XSLT if you do then on your MultiTypes in the Datatypes you need to change the xslt to the MultiTypeXSLT. 

    I've thought I had it so that if it wasn't already set in the prevalue then it would use the MultiTypeXSLT by default.

    If you don't have the MultiTypeXSLT then here it is:

    <?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="html" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>
    <xsl:param name="Name" />
    <xsl:param name="Alias" />
    <xsl:param name="Value" />
    <xsl:param name="SortOrder" />
        
    <xsl:template match="/">

      <span class="name">
        <xsl:value-of select="$Name" />
      </span>:
      <span class="value">
        <xsl:value-of select="$Value" />
      </span>
      <xsl:text</xsl:text>

    </xsl:template>

    </xsl:stylesheet>

    Hope this helps
    Ben

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 07, 2011 @ 13:22
    Ismail Mayat
    0

    Ben,

    Do i need to create a macro that points to that xslt and that is what is picked up in the xslt list in the datatype settings?

    Regards

     

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 07, 2011 @ 13:42
    Ismail Mayat
    0

    Ben,

    Ok sorted it.  However i think there may be a bug. when you use razor scripting macros the list of xslts to select for the datatype seems to be picking up list for razor and not from xslt.  I picked one from razor list and made sure  i created xslt with same same and pasted your code there then viewed page again and i see the content.

    Ps awesome datattype love it!!

    Regards


    Ismail

  • aghy 129 posts 308 karma points
    Jul 07, 2011 @ 13:55
    aghy
    0

    Ismail,

    The drop down list on the MultiType will show all the Macros you have, so you would need to set up a macro that points to an xslt file. You can then change the way it output the data ie not show empty fields. I haven't tried using it to display an image btu i assume it would be possible ...

    In the next update I will be adding a css drop down so you can associate a css file with the MultiType and change the way the MultiType looks to the content editor.

    Thanks
    Ben 

Please Sign in or register to post replies

Write your reply to:

Draft