Copied to clipboard

Flag this post as spam?

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

  • Dan Higbie 11 posts 31 karma points
    Jul 16, 2010 @ 18:30
    Dan Higbie

    Creating Portfolio Items

    I am using Repeatable Custom Content v2 to create a grid of portfolio items.

    However I am having trouble creating a few things. In Masoods example he shows a checkbox list, how do you populate that list with options?

    Also what is the best method to add images, I am guessing media picker, but that gives a weird numeric value that doesn't help me at all.

    Just need a little push in the right direction I suppose.


  • Matt Brailsford 3960 posts 21147 karma points MVP 9x c-trib
    Jul 16, 2010 @ 18:55
    Matt Brailsford

    Hi Dan,

    For the checkbox list, youll probably need to define your own data type in Umbraco using the checkbox list control, then define your prevalues within it.

    For the images, you are right with the media picker. The number you are getting is the media items ID which you'll then be able to use it either via the API to pull back a Media entity, or in XSLT using umbraco.library:GetMedia() to pull back an XML respresentation of the Media entity. From these you can pull back the actual media items url from the umbracoFile property.

    There are plenty of snippets dotted around the forums, so you shouldn't have any propblems finding out to how to do what you need, but let me know if you do hit any stumbling blocks.


  • Dan Higbie 11 posts 31 karma points
    Jul 16, 2010 @ 19:55
    Dan Higbie

    Matt, thanks. I have created a new data type with my own prevalues, my new issue is in the repeatableCustomContent.config it asks for a guid, I don't know how to determine the guid for my new datatype.

    Thanks for your help.

  • Matt Brailsford 3960 posts 21147 karma points MVP 9x c-trib
    Jul 16, 2010 @ 19:57
    Matt Brailsford

    Hey Dan,

    What version of Umbraco are you using?


  • Dan Higbie 11 posts 31 karma points
    Jul 16, 2010 @ 20:07
    Dan Higbie
    0 according to the about box

  • Matt Brailsford 3960 posts 21147 karma points MVP 9x c-trib
    Jul 16, 2010 @ 20:18
    Matt Brailsford

    Ok, in that case, if you hover over you data type in the datatypes tree, you can find it's node id in the status bar, it should look something like this:


    Where xxx is you data types id. Now, if you look in your database, and in the cmdDataType table and find the entry who's node id matches your data types id, the guid you need to add to repeatableCustomContent.config is in the controlId column.


  • Dan Higbie 11 posts 31 karma points
    Jul 16, 2010 @ 20:20
    Dan Higbie

    Thanks, will give it a try.

  • Dan Higbie 11 posts 31 karma points
    Jul 16, 2010 @ 23:32
    Dan Higbie

    I have a entirely new issue now, I have the image thing worked out for the most part. However, when I add the following code the page only says:

    "Error parsing XSLT file: \xslt\Repeatable.xslt"



    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE xsl:stylesheet [  <!ENTITY nbsp "&#x00A0;">]>












    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"/>


      <!-- Input the repeatable custom contents property alias here -->

      <xsl:variable name="propertyAlias" select="string('portfolioItem')"/>


      <xsl:template match="/">


        <!-- The fun starts here -->

        <xsl:if test="$currentPage/data [@alias = $propertyAlias]/items/item">

          <xsl:for-each select="$currentPage/data [@alias = $propertyAlias]/items/item">

    <div class="portfolioItem grid_6">

           <h2><xsl:value-of select="./data [@alias = 'clientName']" disable-output-escaping="yes"/></h2>


    <xsl:variable name="mediaID" select="./data [@alias = 'clientImage']" />


    <xsl:variable name="media" select="umbraco.library:GetMedia(./data [@alias = 'clientImage'], 0)/data" />


     <xsl:if test="$media">

            <xsl:variable name="url" select="$media [@alias = 'umbracoFile']" />

            <xsl:variable name="width" select="$media [@alias = 'umbracoWidth']" />

            <xsl:variable name="height" select="$media [@alias = 'umbracoHeight']" />

            <img src="{$url}" width="{$width}" height="{$height}" />


    <div class="projectDescription">

    <p><xsl:value-of select="./data [@alias = 'projSummary']" disable-output-escaping="yes"/></p>






          <!-- Live Editing support for related links. -->

        <xsl:value-of select="umbraco.library:Item($currentPage/@id,$propertyAlias,'')" />







    If I hard code the value, it works perfectly.

  • Jatin Gadhiya 11 posts 31 karma points
    Jan 08, 2014 @ 08:45
    Jatin Gadhiya

    hello there, I want to create a filterable portfolio/Gallery...can you please help me......???

    and i was some try like...(

    first of all create Document type(e.g.. Name:-Album) and also create album master page.... second one create XSLT file and added some code... and after added macro and import macro in album master page... and after added some images in media folder.... and after create content... choose the folder... and now display all images proper...

    but i want to not display all images...i want to filterable like a portfolio...

    thanks in advance..

    I hope your reponse....

Please Sign in or register to post replies

Write your reply to: