Copied to clipboard

Flag this post as spam?

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


  • Kate 267 posts 610 karma points
    Sep 16, 2013 @ 15:25
    Kate
    0

    mediatype problem in gallery

    Hi

    I'm trying to create a gallery where for each image there must be some text.
    I changed the media type called "File". I put in an extra text-field. It looks like this.



    My first problem is that when I want to upload images to a folder in the media, it does not show the text field.

    When i Richt-click to create an images and choose the Media Type "File" it works fine.

    The easiest for the user will be if they can upload multiple images at once and then afterwards write some text for each image. Is it possible?

    My next problem is in the xslt file.
    When I fetch the pictures from a folder then it only show the images that do not have text field with. So it fails to retrieve the images with a text field. Why is that?

    Here is my xslt:

    <xsl:choose>
    <xsl:when test="$currentPage/pickAFolder!=''">
    <xsl:variable name="images" select="$currentPage/pickAFolder"/>
    <xsl:variable name="mediaItems" select="umbraco.library:GetMedia($images, true())/Image"/>
    <!-- Outer wrapper for presentation only, this can be anything you like -->
    <div id="banner-fade">
    <!-- start Basic Jquery Slider -->
    <ul class="bjqs">
    <xsl:for-each select="$mediaItems">
    <xsl:variable name="picFile" select="umbracoFile"/>
    <li>
    <xsl:element name="img">
    <xsl:attribute name="src">
    <xsl:value-of select="./umbracoFile"/>
    </xsl:attribute>
    <xsl:attribute name="width">
    <xsl:value-of select="195"/>
    </xsl:attribute>
    </xsl:element>
    <div style="width:195px;overflow:hidden;position:absolute;background:red;display:block;margin-top:-50px;height:30px;"><xsl:value-of select="./@nodeName"/></div>jjjjjjgggg
    </li>
    </xsl:for-each>
    </ul>
    </div>
    </xsl:when>
    <xsl:otherwise>
    No Image found
    </xsl:otherwise>
    </xsl:choose>

    Hope you can help me :-)

    Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Sep 16, 2013 @ 22:27
    Jan Skovgaard
    100

    Hi Kate

    If you choose to click on the green upload icon, when you're on a folder then you should be able to bulk-upload images (and other files as well) without much trouble.

    If you create an image item manually make sure you choose the "Image" type and not the File type, which you seem to have chosen judging from the screendump above.

    The property alias of the Upload field (umbracoFile) is the same for "File" and "Image", which I suspect is the cause of some confusion perhaps?

    Hope this helps.

    /Jan

  • Kate 267 posts 610 karma points
    Sep 17, 2013 @ 15:44
    Kate
    0

    Hi Jan

    Thanks for your help. It works :-)

    /Kate

  • Biagio Arobba 16 posts 36 karma points
    Oct 02, 2013 @ 16:58
    Biagio Arobba
    0

    Jan, I have a gallery, too, but my issue is slightly different.

    When I click the upload button, I would like the images that are created to be of the "GalleryImage" type, but everywhere else that the upload button is used I would like the images created to be of the default image type.

    Do you know how to do that? Or, at least where to look?

Please Sign in or register to post replies

Write your reply to:

Draft