Templates import/export

Posted by Community Admin on 03-Aug-2018 16:42

Templates import/export

All Replies

Posted by Community Admin on 25-Jan-2011 00:00

Hi

We are quite far into the development and now we are facing the issue of moving themplates between development, testing and staging servers.

Any tools or samples that might be usefull so we could accomplish that?

Kiril

Posted by Community Admin on 27-Jan-2011 00:00

Hello Kiril,

Would you elaborate a little bit more on the issues you face? Sitefinity deployment scenario should be the standard ASP.NET procedure, and you shouldn't have any problems deploying your website.

We look forward to receiving further information from you, so that we can efficiently help you solve your problem.

Kind regards,
Hristo Borisov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 28-Jan-2011 00:00

Hi Hristo

Well we have 3 servers with Sitefinity - Development, Test, Production

The process is the next one:
- Developers are developing new features (modules + widgets + templates) on Dev server
- When some of the features is ready for testing it is deployed to Test server where QA and Customer is testing it.
- When tested the features that passed are moved to Production.

We can move Modules (DLL), Widgets (DLL + ASCX) + Config just fine, but we don't have any way to move templates that are created in Sitefinity.
So the question is
How to export template from Sitefinity installation and then Import that template to another installation?

//Kiril

Posted by Community Admin on 02-Feb-2011 00:00

Hi Kiril,

The only way you can currently export templates is to develop them as master pages in the very first time, and then move and register the templates in your project. The problem is that we currently store the templates inside the database and we haven't yet implemented an easy way to move them across projects. We plan to develop much easier synchronization among testing and production environments, however I cannot bind to any specific date for now.

Excuse us for the inconvenience and please let me know whether there is anything else you would like to share with us in order to improve our current roadmap.

Greetings,
Hristo Borisov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 02-Feb-2011 00:00

By developing templates as Master pages we are then limiting the end users to use Layout editor to modify them later. So this is not really acceptable.

//Kiril

Posted by Community Admin on 02-Feb-2011 00:00

Is there an option to create a template with code by using the fluent (or some other parts of) api ?

Posted by Community Admin on 09-Feb-2011 00:00

Hi Lasse and Kiril,

You can use the bellow code to create page templates based on master pages:

PageManager manager = PageManager.GetManager();
var t = manager.GetTemplates().First();
Guid id = Guid.NewGuid();
PageTemplate pageTemplate = manager.CreateTemplate(id);
pageTemplate.Name = "MyPageTemplate";
pageTemplate.Title = "My Page template";
pageTemplate.Category = t.Category;
pageTemplate.MasterPage = "~/App_Master/MyMasterPage.Master";
manager.SaveChanges();


Regards,
Radoslav Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 11-Dec-2011 00:00

Radoslav,

I have a Small Business Edition here. I have used the Template builder to create a template and now I am adding it into the project but all I can see is the Content Placeholders and that's all. Also, the Template Builder would crush everytime I tried to upload my own image. I was unable to upload any images, no matter the format. How do I add a template without the Template Importer and have all the colours that I have chosen be remembered?

Many thanks
Andrei

Ok, I figured out that those templates can only be added properly through the Template Importer. How do I register the Template Importer is teh next question.

Posted by Community Admin on 14-Dec-2011 00:00

Hello Andrei,

The template importer is registered as any other Sitefinity module. You need to regustered in the application modules section of the SystemConfig. You need to take the template importer project from the SDK, build it against the version of your Sitefinity project, and add the dll to your project. Then register it as if you are registering a custom module.

Regards,
Radoslav Georgiev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 15-Dec-2011 00:00

Radoslav,

1 - I have extracted it from the SDK,
2 - I have imported it as another project in my solution.
3 - I have added it as a reference,
4 - I have built teh solution and that adds the TemplateImporter.dll to the WebApp bin,

Now what I need to know is the exact steps of:
1 - Where do I go and what do I type in? A screen-shot would be fantastic.

Many thanks,
Andrei

This thread is closed