ASPX templates
Version 7.x > ASPX templates > any help with my code View modes: 
User avatar
Member
Member
gissah-shipltc - 3/28/2013 12:24:29 PM
   
any help with my code
can someone look at my code and advise
I am trying to play a video from a folder instead of youtube
my vidlink works fine in a browser. but will not work with cms.
it is just blank screen.
I try this also
@"\\server\\drive$\\Folder1\\Folder2\\media\\Video_Gallery\\introvideo.mp4

string getPath = CMS.CMSHelper.CMSContext.CurrentAliasPath;
string[] splitPath = getPath.Split('/');
string VidLink = @"\\server\drive$\Folder1\Folder2\media\Video_Gallery\introvideo.mp4";
string DataServImg = "b-data-services.gif", PulseImg = "b-pulse.gif", CatImg = "b-catalyst.gif", SentImg = "b-sentienel.gif", ProfServImg = "b-prof-services.gif";
bool isleftNavSet = false;
if (splitPath.Length >= 1)
{
if (splitPath[1] == "Services")
{
isleftNavSet = true;
if (splitPath.Length > 2)
{
switch(splitPath[2].ToLower())
{
case "pulse":
PulseImg = "b-pulse-o.gif";
VidLink = "http://www.youtube.com/embed/-9Np-k2bz3A?rel=0&autoplay=1&modestbranding=1";
break;
case "catalyst":
CatImg = "b-catalyst-o.gif";
VidLink = "http://www.youtube.com/embed/ICGdUQrxOng?rel=0&autoplay=1&modestbranding=1";
break;
case "sentinel":
VidLink = "http://www.youtube.com/embed/MWSmKblXe1I?rel=0&autoplay=1&modestbranding=1";
SentImg = "b-sentienel-o.gif";
break;
case "data-services":
DataServImg = "b-data-services-o.gif";
break;
case "professional-services":
ProfServImg = "b-prof-services-o.gif";
break;
default:
break;
}

}

}
}
%

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 4/7/2013 10:04:03 AM
   
RE:any help with my code
Hi,

In which context is this code run? Do you use our default web part or control?
Which path do you pass to our controls or to any functional control?
More information about this would be helpful.

Regards,
Zdenek

User avatar
Member
Member
annaharris170-gmail - 5/3/2013 8:14:05 AM
   
RE:any help with my code
You may have placed the wrong path of the video, else your code looks fine to me.