Hi guys I'm looping through a list of images.. I have a directory structure like:
FolderName\
FolderName\Large\
I'm trying to loop through the folder and list the small images and provide a link to the large folder with an image with an identical name to the small image
Try as I might I can't seem to work out how to map essentially all of the image path of the small image and add large to the file folder.. Just wondering if anyone could suggest something.. i don't really want to be using image gen..
Try as I might I can't seem to work out how to map essentially all of the image path of the small image and add large to the file folder.. Just wondering if anyone could suggest something.. i don't really want to be using image gen.. the id of the current looping image doesn't map to the same number generated by umbracoFile
Is the "Large" folder a folder physically on the disk under each media item (ie /media/xxx/large/xxx.jpg), or is it a single Folder in the Media Library under your "caseStudyImageFolder"?
Hi Tom, thanks for replying! It's a media folder.. is there any way you could suggest a better way of doing a gallery with small and large images in the media without paying for imagegen?
I think the Free Version of ImageGen might suffice depending on your needs.
Another way is that Umbraco generates a thumbnail for you when you upload the media item. You can control the sizes of the thumbnail by editing the upload datatype (Developer -> Data Types -> Upload). But if you make a change you need to go through and manually re-save all your media items. This creates a file in the same folder as the media item called filename_thumb.ext.
If you decide to keep your current way, something like this could probably work (not tested)
<xsl:variable name="mediaFolder" select="umbraco.library:GetMedia(./caseStudyImageFolder,true())"/> <xsl:for-each select="$mediaFolder/Image"> ... your stuff ... <!-- The large image (image in the Large sub-folder with the same nodeName:--> <xsl:value-of select="$mediaFolder/Folder [@nodeName='Large']/Image [@nodeName = current()/@nodeName]/umbracoFile"/> </xsl:for-each>
LEGEND! Thank you so much tom1 that xslt for the large folder worked perfectly! nice solution setting the media folder then finding the node with the matching node name! that's awesome! Thank you
Get Large Image Folder From Current Folder..
Hi guys I'm looping through a list of images.. I have a directory structure like:
FolderName\
FolderName\Large\
I'm trying to loop through the folder and list the small images and provide a link to the large folder with an image with an identical name to the small image
<xsl:for-each select="umbraco.library:GetMedia(./caseStudyImageFolder, true())/Image">
<xsl:if test="position() = 1"><xsl:value-of select="$ulOpen" disable-output-escaping="yes"/></xsl:if>
<xsl:variable name="picFile" select="umbracoFile"/>
<xsl:variable name="picW" select="umbracoWidth"/>
<xsl:variable name="picH" select="umbracoHeight"/>
<li>
<a href="/media/{./@id}/large/{./name}.{./type}" class="image-zoom"><img>
<xsl:attribute name="src"><xsl:value-of select="$picFile"/></xsl:attribute>
</img></a>
</li>
<xsl:if test="position() = last()"><xsl:value-of select="$ulClose" disable-output-escaping="yes"/></xsl:if>
</xsl:for-each>
Try as I might I can't seem to work out how to map essentially all of the image path of the small image and add large to the file folder.. Just wondering if anyone could suggest something.. i don't really want to be using image gen..
Try as I might I can't seem to work out how to map essentially all of the image path of the small image and add large to the file folder.. Just wondering if anyone could suggest something.. i don't really want to be using image gen.. the id of the current looping image doesn't map to the same number generated by umbracoFile
The client doesn't want to pay for image gen..
Hi Tom,
Is the "Large" folder a folder physically on the disk under each media item (ie /media/xxx/large/xxx.jpg), or is it a single Folder in the Media Library under your "caseStudyImageFolder"?
-Tom
Hi Tom, thanks for replying! It's a media folder.. is there any way you could suggest a better way of doing a gallery with small and large images in the media without paying for imagegen?
Hi Tom,
I think the Free Version of ImageGen might suffice depending on your needs.
Another way is that Umbraco generates a thumbnail for you when you upload the media item. You can control the sizes of the thumbnail by editing the upload datatype (Developer -> Data Types -> Upload). But if you make a change you need to go through and manually re-save all your media items. This creates a file in the same folder as the media item called filename_thumb.ext.
If you decide to keep your current way, something like this could probably work (not tested)
Hope this helps,
Tom
LEGEND! Thank you so much tom1 that xslt for the large folder worked perfectly! nice solution setting the media folder then finding the node with the matching node name! that's awesome! Thank you
is working on a reply...