Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Media Selection Url Issue View modes: 
User avatar
Member
Member
amarwadi-gmail - 8/31/2010 6:26:58 PM
   
Media Selection Url Issue
Hello,
I am using a Media Selection control on a Document type that I have created. When I upload the file using the Media Selection control, it generates the URL as follows:
/TestCmsSite/Images/Executives/TestMan.aspx?width=97&height=145&ext=.jpg

Where TestCmsSite is the site code name and the TestMan is the name of the file.

When I publish this site to test.companyname.com site name, i noticed that the Images still have the TestCmsSite alias in there.
Thus the path of the site now is: http://test.companyname.com/TestCmsSite/Images/Executives/TestMan.aspx?width=97&height=145&ext=.jpg

However, the correct URL should be:
http://test.companyname.com/Images/Executives/TestMan.aspx?width=97&height=145&ext=.jpg

Is there a way by which we can generate these URL's correctly? Also, is it possible to generate relative URLs? It shouldn't be referencing the entire path, but just start from the correct relative path right?

In my transformation we're using the Media Selection Control as follows:

<%@ Register TagPrefix="cms" TagName="Media" Src="~/CMSInlineControls/MediaControl.ascx" %>

<cms:Media id="memberPhoto" runat="server" Url='<%# Eval<string>("MemberPhoto")%>'/>



Any thoughts?

Any guidance would be appreciated.