Technical support This forum is closed.
Version 1.x > Technical support > How to display Product and ImageGallery on the same page? View modes: 
User avatar
Member
Member
astajl - 4/4/2006 10:22:08 AM
   
How to display Product and ImageGallery on the same page?
Hi,

I use version 1.8c, VS 2003, VB.Net.

For the Sample Corporation Site, the product detail page is linked to its own imagegallery page. How can I combine these 2 pages into 1 page?

This involved the concept to display the content of the parent node and child node at the same time.

Thx.

User avatar
Guest
admin - 4/5/2006 1:51:07 PM
   
Re: How to display Product and ImageGallery on the same page?
Hello,

we haven't tested this but you can try to use the ImageGalleryThumbnails.ascx instead of the ImageGallery.ascx control and set the

ImageGalleryThumbnails.SelectNodesPath and
ImageGalleryThumbnails.SelectNodesPathType

values to the path of the image gallery you want to display.

Best Regards,

User avatar
Member
Member
astajl - 4/6/2006 9:48:14 AM
   
Re: How to display Product and ImageGallery on the same page?
Hello,

I add the followings to the Products.aspx
<%@ Register TagPrefix="uc2" TagName="ImageGalleryThumbnails" Src="ImageGallery/ImageGalleryThumbnails.ascx" %>
...
<uc2:ImageGalleryThumbnails id="ImageGalleryThumbnails" runat="server" SelectNodesMaxRelativeLevel="1" SelectNodesPathType="AliasPath" SelectNodesPath="/Products/Category A/Product A1/Product A1 Gallery"></uc2:ImageGalleryThumbnails>

I expect each Product detail page can display that products' own ImageGalleryThumbnails. How can I set the SelectNodesPath?

User avatar
Guest
admin - 4/11/2006 4:26:52 PM
   
Re: How to display Product and ImageGallery on the same page?
Hello,

in that case, you will need to use the same NodeAlias for all image galleries under products, such as "ProductGallery" and use a code like this:

ImageGalleryThumbnails1.SelectNodesPath = Functions.GetPathLevel(Functions.GetAliasPath(), 3) + "/ProductGallery";

Best Regards,

User avatar
Member
Member
astajl - 4/12/2006 7:28:08 AM
   
Re: How to display Product and ImageGallery on the same page?
Hello,

Your solution works, but the flexibility is quite low. This approach limits the Path level must 3. If sub categories are added in the future, the aspx file must be modify again, or use other page template (use other aspx file). Right?

Is there an other approach have higher flexibility?

I try to set some server tag value to the SelectNodesWhere attribute in the Product's transformation file e.g. details.ascx as
<b><uc2:ImageGalleryThumbnails id="ImageGalleryThumbnails" runat="server" SelectNodesMaxRelativeLevel="1" SelectNodesWhere="ProductName=<%# DataBinder.Eval(Container, "DataItem.ProductName") %>"SelectNodesPathType="AliasPath"></uc2:ImageGalleryThumbnails></b>

But server tag is not allowed on this case. Do you have any other suggestion?

Regards,

User avatar
Guest
admin - 4/12/2006 6:15:40 PM
   
Re: How to display Product and ImageGallery on the same page?
You may want to try something like this (but we haven't tested it):

if (Functions.GetDocumentType().ToLower() == "cms.product")
{
ImageGalleryThumbnails1.SelectNodesPath = Functions.GetAliasPath() + "/productgallery";
}

Best Regards,