Copied to clipboard

Flag this post as spam?

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


  • Cristian 24 posts 45 karma points
    Nov 07, 2011 @ 17:57
    Cristian
    0

    Changing Source (imageFolder) of jqGallery

    Hi Everyone!

    i have a problem changing the source of one gallery with jqGallery Project,

    i can change the forlder source sending the id folder from querystring, and works fine, but the problem comes when the folder source has diferent number of image. in fact the source does chance but the divs (prev and next) don´t show in the galleries with less items.

    any idea what is happing?.

    im using Umbraco 4.7 and changing the source with xslt, and then call the macro jqGallery

    Regarts

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 09, 2011 @ 21:00
    Jan Skovgaard
    0

    Hi Christian

    Coud you perhaps post some of the XSLT code? I think this will make it easier for us to spot where things are going wrong :)

    /Jan

  • Cristian 24 posts 45 karma points
    Nov 09, 2011 @ 23:21
    Cristian
    0

    Hi Jan thanks for replay,

    here is my code:

    with this i create a list of galleries:


    DOCTYPE xsl:stylesheet [ ENTITY nbsp ""> ]>
    <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:ucomponents.cms="urn:ucomponents.cms" xmlns:ucomponents.dates="urn:ucomponents.dates" xmlns:ucomponents.io="urn:ucomponents.io" xmlns:ucomponents.media="urn:ucomponents.media" xmlns:ucomponents.members="urn:ucomponents.members" xmlns:ucomponents.nodes="urn:ucomponents.nodes" xmlns:ucomponents.search="urn:ucomponents.search" xmlns:ucomponents.strings="urn:ucomponents.strings" xmlns:ucomponents.urls="urn:ucomponents.urls" xmlns:ucomponents.xml="urn:ucomponents.xml"
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ucomponents.cms ucomponents.dates ucomponents.io ucomponents.media ucomponents.members ucomponents.nodes ucomponents.search ucomponents.strings ucomponents.urls ucomponents.xml ">

    <xsl:output method="xml" omit-xml-declaration="yes"/>
      
    <xsl:param name="currentPage"/>
    <xsl:template match="/">
      
      <xsl:variable name="puerto" select="51883"/>
      <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
        
        <xsl:if test="position() = 1 ">
          <xsl:variable name="idGalleryContent">
            <xsl:choose>
              <xsl:when test="umbraco.library:RequestQueryString('IdGalleryContent') != ''">
                <xsl:value-of select="umbraco.library:RequestQueryString('IdGalleryContent')"/>
              xsl:when>
              <xsl:otherwise>
                <xsl:value-of select="@id"/>
              xsl:otherwise>
            xsl:choose>
          xsl:variable>

          <xsl:variable name="titleGallery" select="umbraco.library:GetXmlNodeById($idGalleryContent)/TitleGallery"/>
          <xsl:variable name="idGallery"  select="umbraco.library:GetXmlNodeById($idGalleryContent)/GalleryPictures"/>

          <xsl:variable name="macro" select="concat('<?UMBRACO_MACRO macroAlias="SlideGallery" imageFolder="', $idGallery, '" galleryTitle="', $titleGallery, '"></?UMBRACO_MACRO>')"/>
          <xsl:value-of select="umbraco.library:RenderMacroContent($macro, @id)" disable-output-escaping="yes"/>
           <br/>
        xsl:if>
        
        <div class="teaserImageText">
          <div class="teaserImageTextImage">
            
            
            <xsl:variable name="idImage" select="./ImageGallery"/>
            <xsl:if test="string($idImage) != ''">
              <img src="{umbraco.library:GetMedia($idImage,0)/umbracoFile}" alt="{./TitleGalleryContent}">img>
              <br/>
            xsl:if>
          div>
          
          <div class="teaserImageTextText">
            <p class="teaserImageTextTextHeadline">
              <xsl:value-of select="./TitleGallery"/>
            p>
            <p>
              <xsl:variable name="text" select="./GalleryContent"/>
              <xsl:value-of select="$text" disable-output-escaping="yes"/>
            p>
                <xsl:variable name="domain" select="umbraco.library:RequestServerVariables('SERVER_NAME')"/>
                <xsl:variable name="url" select="concat('http://',$domain,':',$puerto,'/galeria.aspx','?IdGalleryContent=',@id)"/>
                <p>
                  <xsl:element name="a">
                    <xsl:attribute name="class">intLinkxsl:attribute>
                    <xsl:attribute name="newwindow">0xsl:attribute>
                    <xsl:attribute name="href">
                      <xsl:value-of select="$url"/>
                    xsl:attribute>
                    Ver Galeria
                  xsl:element>
                p>
              div>
          <div class="clearBoth">div>
        div>
      xsl:for-each>
    xsl:template>
    xsl:stylesheet>

     

    and this is my code for the slide gallery:


    DOCTYPE xsl:stylesheet [ ENTITY nbsp ""> ]>
    <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:variable name="imageFolder" select="/macro/imageFolder" />
      <xsl:variable name="galleryTitle" select="/macro/galleryTitle" />
          <div class="image_gallery">
          <xsl:if test="string($galleryTitle) != ''">
            <div class="formHeader"><xsl:value-of select="umbraco.library:Replace($galleryTitle, '\r\n', ' ')" />div>
            <br/>
          xsl:if>
          <div class="gallery_main">
            <a class="prev gal_nav"> a>
              <div class="scrollable">
                <ul class="items">
                  <xsl:if test="$imageFolder">
                    <xsl:variable name="mediaItems" select="umbraco.library:GetMedia($imageFolder/*/@id, 'true')" />
                    <xsl:for-each select="$mediaItems/Image">
                      <xsl:if test="@id != ''">
                        <li>
                          <a>
                            <img alt="{./TitleContent}"
                                  src="{umbraco.library:GetMedia(@id,0)/umbracoFile}"
                                  width="448" height="299" />
                          a>
                        li>
                      xsl:if>
                    xsl:for-each>
                  xsl:if>
                ul>
              div>
            <a class="next gal_nav"> a>
          div>
        div>  
    xsl:template>
    xsl:stylesheet>

    im hope can find the problem... : )

    regards

  • Cristian 24 posts 45 karma points
    Nov 18, 2011 @ 17:37
    Cristian
    0

    sundely it just work fine...

    i just add more list of galleries, i really don´t know what happened.

    thanks for your reply

Please Sign in or register to post replies

Write your reply to:

Draft