Developer forum

Forum » Swift » Replace harcoded path with dynamic path

Replace harcoded path with dynamic path

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,
I have a project where I need to implement multiple websites, each with its own design customization.
So far, the best choice for keeping the design separated is to duplicate Swift v2 design folder.
One of the issues is the hardcoded path to various resources, and I was wondering if I could replace the hardcoded path with a dynamic "Design folder" path.
Thank you,
Adrian
 


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Bump!

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

PageView.Current().Layout.Design.Name should contain the name of the websites chosen design folder.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,
Thank you!
Any performance concerns?

Thank you,
Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Always!

But this one is just reading a property. Overhead is there, but probably not even measurable.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Thank you!

 

You must be logged in to post in the forum