Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
var folder = GetPageDirectory(page,true)
var subFolder= HostingEnvironment.VirtualPathProvider.GetDirectory(folder.VirtualPath+"subFolderName/")
You can use the following:
EPiServer.Web.Hosting.UnifiedDirectory pageFolderForCurrentPage = CurrentPage.GetPageDirectory(true);
Hi.
When I am on Edit Mode, then click on a page and then on the File Managemenet System (on the CMS Toolbar) it offers to create a PageFile folder. I can create the folder MyNewFolder using the front end but I cannot find the folder programatically with the following code:
HostingEnvironment.VirtualPathProvider.DirectoryExists("/PageFiles/MyNewFolder")
I know the folder exists but the name of the folder is and ID number: HostingEnvironment.VirtualPathProvider.DirectoryExists("/PageFiles/1342")
How can I check and get the PageFile folder from a particular page?..something like:
CurrentPage.GetFileFolder() or something like DirectoryHandler.getDirectory(currentpage)
Thanks in advance