Developer forum

Forum » Rapido » Dynamic includes?

Dynamic includes?

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

In many Rapido templates I see this:

@if (File.Exists(HttpContext.Current.Server.MapPath("/Components/Custom/Custom__Components.cshtml")))
{
    <text>@Include("Components/Custom/Custom__Components.cshtml")</text>
}

Is this an attempt to include dynamically? Or just to execute the code dynamically? I thought that @Include was parsed first before the template would be processed, so wouldn't the output be the same with or without the File.Exists check?

Imar


Replies

 
Nicolai Pedersen
Reply

We will look into this. You are totally right and we will try to get a fix out with 3.1.1 hotfix.

Thanks, Nicolai

 

You must be logged in to post in the forum