Copied to clipboard

Flag this post as spam?

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


  • Djan Blom 99 posts 161 karma points
    Apr 11, 2013 @ 20:25
    Djan Blom
    0

    Embedded content start help

    Hi guys,

    I need some help setting up Embedded Content, and pulling out the data.

    I have installed the package, created the datatype "embedContent" and made a tab on my gallery page where I can add the items such as

    Header(alias: embedHeader)
    Description(alias: embedDescription)
    Image Preview(alias: embedPreview)
    Link(alias: embedLink)

    and added a test item on the gallery-tab I made.

    My Xslt validates..

    <xsl:template match="/">
    <ul>
    <xsl:for-each select="$currentPage/data/item">
    <li>
    <xsl:value-of select="embedHeader" />
    <xsl:value-of select="embedDescription" />
    </li>
    </xsl:for-each>
    </ul>


    </xsl:template>

    and here is the macro I added on in the Gallery template:

          <umbraco:Macro Alias="contentList" runat="server" />

     

    What am I missing here? Parameters in the Macro?


    Kind Regards, Djan

    http://djan.se

     

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Apr 12, 2013 @ 18:37
    Jeavon Leopold
    100

    Hi Djan,

    I think you are just missing the alias of your document type property that uses your embedded content data type. 

    <xsl:for-eachselect="$currentPage/propertyAlias/data/item">

    Regards,

    Jeavon

  • Djan Blom 99 posts 161 karma points
    Apr 16, 2013 @ 16:43
    Djan Blom
    0

    Hi Jeavon, Thanks for answering!

    I tried a number of different alias', but nomatter what, I get no output on my page ?

    From DocumentType Generic Properties:

    Tab: Embedded Content
    Name: webPortfolio (alias: webPortfolio)
    Type: Embed Content

    ##################################

    My Macro:

     <umbraco:Macro Alias="WebPortfolio"runat="server"/>

    And my current 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"xmlns:tagsLib="urn:tagsLib"xmlns:BlogLibrary="urn:BlogLibrary"
           
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary ">


    <xsl:outputmethod="xml"omit-xml-declaration="yes"/>

    <xsl:paramname="webPortfolio"select="/macro/Field"/>
    <xsl:paramname="currentPage"/>

    <xsl:templatematch="/">
           
    <ul>
                           
    <xsl:for-eachselect="$currentPage/webPortfolio/data/item">
                           
    <li>
                                   
    <xsl:value-ofselect="embedHeader"/>
                                   
    <xsl:value-ofselect="embedDescription"/>
                           
    </li>
                   
    </xsl:for-each>
           
    </ul>
           
           
    </xsl:template>

    </xsl:stylesheet>

    and my Tab with added Testcontent :
    http://oi46.tinypic.com/10fw4yo.jpg

     

    And yet, still no Output at : http://djan.se/webportfolio.aspx

    Have I got the Alias wrong, or what am I doing..? =)

     

    /Djan

  • Djan Blom 99 posts 161 karma points
    Apr 16, 2013 @ 16:53
    Djan Blom
    0
    * macro is with 'w' 
    <umbraco:Macro Alias="webPortfolio"runat="server"/>
  • Djan Blom 99 posts 161 karma points
    Apr 16, 2013 @ 18:03
    Djan Blom
    1

    And I made it work - thanks Jeavon. =)

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Apr 16, 2013 @ 18:20
    Jeavon Leopold
    0

    Oh great! Glad you got it going!

Please Sign in or register to post replies

Write your reply to:

Draft