Developer forum

Forum » Development » Unable to create a new paragraph template

Unable to create a new paragraph template

Søren Nielsen
Reply

Hello.
I am trying to implement my own version of the "product field display groups" content type alongside a template.

I have created ItemType .xml file which i can chose as a paragraph in the CMS system.
But when creating a .cshtml file and trying to choose it as a layout for the paramgraph, I cannot find it.

Are there any aditional steps i need to take to create a template for a ItemType?
Also, where can I read more about creating new ItemTypes and Templates?


Replies

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply

Hi Søren

It sounds like that there is no issue in the restrictions setup, on the item type. But just to confirm, it should look like this:


The issue may be that the template name is not exactly the same as the item type system name (And the template must be in the Paragraph folder):


I guess this may be the documentation you are looking for:
Swift 1: https://doc.dynamicweb.com/swift/customization 
Swift 2: https://doc.dynamicweb.dev/swift/getting-started/index.html


Best regards
Karsten Thuen

 
Søren Nielsen
Reply

Hi Karsten - Thanks for the reply :)

Yes, the restrictions looks similar.

Working more with this a have something that is working.
I think my problem was that i tried to create the template in a seperate folder than the Swift-v2 folder, to differentiate between custom templates and swift templates.

Here is the current situation:

I am able to use template nr. 2 but not template nr. 1.
Is this intended behaivor? - or is it possible to create templates outside the Swift-v2 folder? 

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply
This post has been marked as an answer

Hi Søren

You can not make the setup like that, where you have a separate design folder. The design that is in use, is the design where the page/master template is and that is selected in website settings.



You must put the templates in the Swift-v2 folder, while working with the Swift design. Having a prefix, like "Smartvan_", is a very good way to keep track of the things you added or made custom on the project. 

Hope it makes sense


Best regards
Karsten Thuen

Votes for this answer: 1

 

You must be logged in to post in the forum