Go back to mobile site

 

Please note: The forums are currently intended for Kentico community. Although we monitor them time to time, we cannot guarantee a timely response. If you need a help with Kentico CMS, please feel free to send your message to support@kentico.com.

If you want to add new post or reply to post, please sign in.

Search: 

ASPX templates
Version 3.x > ASPX templates > Add webpart to transformation View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
bryan-bit-wizards - 10/28/2008 9:29:19 AM
     
Add webpart to transformation
Is it possible to add a webpart in a transformation? I would like to dynamically add the LightBoxGallery webpart using a transformation for a query.

Is this possible?

User avatar
Certified Developer v7
Certified  Developer v7
bryan-bit-wizards - 10/28/2008 11:08:56 AM
     
RE:Add webpart to transformation
I created a user control which uses the LightBoxGallery.ascx control. I have added an Inline Control to system. I can include it in my transformation using:

Ex: %%control:MYLightBoxGallery%%

I need to pass it a value for its parameter. I can do this with a static path:

Ex: %%control:MYLightBoxGallery?Images/MyFolder/%%

However, I need to pass the parameter dynamically in the transformation. I have tried the following, however it is just passing the Eval code text as a string.

%%control:MYLightBoxGallery?Eval("ImageGalleryPath") %%

I need to pass the value of Eval("ImageGalleryPath") as the parameter. Is this possible?

User avatar
Certified Developer v7
Certified  Developer v7
bryan-bit-wizards - 10/28/2008 11:19:43 AM
     
RE:Add webpart to transformation
The following code in my transformation worked:

%%control:MYLightBoxGallery?<%#Eval("ImageGalleryPath")%>%%

The issue was that the "ImageGalleryPath" contained the following:

"/images/gallery/%"

The "%" was causing an issue in the parameter that was passed. I removed it from the bizform field and modified the inline control to append this to the parameter:

this.LightboxImageGallery.Path = this.Parameter + "%";

Hope this helps anyone with the same issue.

User avatar
Member
Member
foobar17554 - 6/30/2010 9:03:00 AM
     
RE:Add webpart to transformation
Hi Bryan,

Was there supposed to be a code sample in your first post in this thread? If so it's missing. Can you re-post and add it please? That would be most helpful.

Thanks,
CW

User avatar
Member
Member
foobar17554 - 6/30/2010 9:03:30 AM
     
RE:Add webpart to transformation
Actually, it was the second post.

User avatar
Kentico
Kentico
kentico_jurajo - 7/1/2010 2:53:10 AM
     
RE:Add webpart to transformation
Hi,

The code used in the examples that was inserted was resolved in the text area :-)

You can see it below - I added extra spaces using underscore sign ("_"), so it won't be resolved:

2nd post:
%_%_control:MYLightBoxGallery_%_%
%_%_control:MYLightBoxGallery?Images/MyFolder/_%_%

3rd post:
%_%_control:MYLightBoxGallery?<%_#Eval("ImageGalleryPath")%_>_%_%

Best regards,
Juraj Ondrus

1

Sitemap | Content Management System | E-commerce Software | Social Networking Software | Intranet | Online Marketing Solution | Copyright © 2004-2013 Kentico Software | Powered by Kentico CMS