开发者

Understanding the basics of adding/creating a new template for Umbraco

I must be really honest. Umbraco is very different to other CMS packages Ive used. This time I am having trouble understanding the correct way of creating a Template and adding it to Umbraco.

How do I add a template ? I am modifying the starter kit I have but that's not what I want. There's not "Template" 开发者_运维百科directory in my installation of Umbraco 4.7

Is there a quick way of doing this ?


You can manage all templates through the Umbraco interface. The templates directory can be found under Settings > Templates in the Umbraco backoffice.

You can also create XSLT Files (under Developer > XSLT Files) which will serve as templates for macros that can be used throughout your website (you can learn more about XSLT macros here: http://blog.percipientstudios.com/2009/5/5/your-first-umbraco-xslt-macro.aspx).

I personally have never tried to edit templates, etc. outside of Umbraco but there is a Visual Studio project template that can be used. This mimics the Umbraco folder structure in a VS solution and ensures that you upload documents, etc. into the correct directories. You can learn more about it here: http://our.umbraco.org/projects/developer-tools/visual-studio-2010-project-template-


In the Umbraco admin panel navigate to the Settings section and find a Templates folder. Right-click on it and choose to create a template, you can then edit it right in the admin panel.

If you want to edit it in some other editor, like Visual Studio, navigate to your Umbraco installation directory (one, which contains umbraco and umbraco_client folders) and look for masterpages (contains WebForms templates) and Views (contains Razor templates) folders. They will contain actual .master or .cshtml files, which you can add to your project, and edit.

Umbraco will handle template modification from the outside just fine.


You can create templates from Settings section of umbraco CMS. There you can see Templates secion. Right click on it and create new templates.

If you are familiar with .Net web development,you are familiar th master pages and all. In a similar way you can create a master template and child templates. So the child template will inherit all the controls from master template.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜