Developer forum

Forum » Dynamicweb 10 » Nested design folders

Nested design folders

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I remember at some point some discussion around having nested Design folders under "Swift".
Is this still a thing? Is it documented somewhere?

The reason for this is that sometimes you may need to override some templates for a specific implementation without duplicating the entire Swift folder.

Looking forward to find out more about this.

Thank you,

Adrian


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Technically it is.

But it is not very easy to understand. We still recommend copying the template you need to customize and add to the name _customized - and then select the template.

Using the customized nested folder is difficult to understand, and if your template has dependencies, e.g. includes and masters, you has also have to copy those.

This is the override paths:

Swift/paragraphs/sometemplate.cshtml
Swift_Custom/paragraphs/sometemplate.cshtml

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

In my situation, I am trying to implement 2 (or more) projects on the same installation.
If I use the same template folder, some settings will be separated based on the AreaID but I cannot separate everything I need. For example, following the Swift 2 Pattern of Layouts, if I have to customize an item type (say, banner) to allow for standard templates and custom templates, both of my projects will see all templates.

The nested approach would (maybe) allow me to configure a master design folder and one or more child design folders. But if I understand your explanations correctly, I can only have one child design folder {.}_custom

Another option would be to duplicate the folders but in this case maintaining and updating would get complicated.

I guess that my use case is not (yet) supported completely but the current architecture and I am not sure if you have any plans in this direction.
But if you do, I have a couple of suggestions that may improve the multi-anything approach.
For now, I will stick with duplicating the design folder.

Thank you,

Adrian 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Adrian

In your case, you can customize the existing itemtype and templates, and then use restrictions to control which item types can be used on which website.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I don't want to do that either. it would be too much overhead to maintain.

I do have a set of ItemTypes I would like to use and in some situations, I need to customize the layouts for a specific website.

The way things are right now, It seems that duplicating the design folder is the only option that is supported standard.
Not ideal, but better than the alternatives I know about.
I was also considering adding the default templates in the standard folders (one level above the Design folder) but I am afraid that it would fail in other ways.

Thank you,
Adrian

 

You must be logged in to post in the forum