Umbraco - Dynamic Layout for the Site - umbraco

We are using Umbraco 4.5 in our Application. We need to deploy same application on multiple different servers. The core features of the system will remains the same but, we need different Look & Feel for all the site.
Eg. Layout (2 Column, 3 Column), Skin & Theme will be different for each site
so, we need same source code on multiple sites but UI will be different so, in Umbraco - we need to add all different UI (Skin, Theme, Images, CSS etc) and based on configuration specific
How can we get this done?
Thanks in Advance

Look at the skinning technology in umbraco
see also:
http://umbraco.com/help-and-support/video-tutorials/creating-a-skin-for-umbraco

Related

what does the model.generated.cs file do in Umbraco?

Exploring Umbraco 8 and playing around building a test site etc.
Building document types and content pages via the back office interface, and looking in the code itself I've noticed a files called models.generated.cs.
looking inside, it contains partial classes like public partial class AndyTestPage : PublishedContentModel { } and properties I've given it like
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Umbraco.ModelsBuilder", "8.5.5")]
[ImplementPropertyType("andyProperty1")]
public string AndyProperty1 => this.Value<string>("andyProperty1");
my question is, what exactly is the point of this file? what does is do and how are these properties and classes created in here via the backoffice cms.
second question is, how would I go about creating a document type, and properties from code? my noob assumption is to simply add the classes in the this file, but that doesnt seem right?
Thanks,
Andy
It belongs to modelbuilder.
It depends on how you build your umbraco solution. If you use visual studio you can use something called strongly type, it helps building templates with VS.
By default, modelsbuilder is set to "PureLive", which is for users who builds within the umbraco backoffice system.
You can set modelsbuilder to different options, depending on how you build.
You should not edit the file, it is created and maintained by the system.
https://umbraco.tv/videos/umbraco-v7/implementor/working-with-umbraco-data/working-with-models-builder/
https://our.umbraco.com/documentation/reference/templating/modelsbuilder/
elitenet.dk has answered the first question
With regards to your second question Umbraco is database/content first so unfortunately you cant write documenttypes etc. from code first... not that i know of.
I beleive this is because Umbraco was designed to be used by almost anyone with a little html/css knowledge. E.g. You can create templates and views from the cms without having to know anything about serverside development.
Just a little tip if youre starting with Umbraco and plan on using multiple environments take a look at Kevin Jumps Usync package, essentually the package allows for document types/properties etc. to be pushed from environment to environment.Usync

MVC project structuring

I have been looking for an solution for structuring my MVC5 project, but have not found anything yet.
What i look for is. I have an Main Website, which off-course has it's own Views, Scripts and Controllers, but what is special is that i like to have sub Website projects which add an menu point in the main page, but the sub website also contains it's own Views, scripts and Controllers( I have tried to draw a picture of what i'm talking about ).
The point of this is to have an structured in a easy way. But also to reuse the same views in a framework way.
You should be able to define an area in another project, found an article that explains in detail how it is done in MVC3, it should not be very different in later versions since areas and routing haven't changed a lot.
http://nileshhirapra.blogspot.no/2012/02/aspnet-mvc-pluggable-application.html
Update: you do not actually need to set up the project in the Areas folder, but you need to copy all content like views and scripts/css into there before being able to use it in the main application.
If you want these sites to actually be separate websites but only look similar, then that is what you'd need to set up. You'd probably want to decide on a single-sign-on scheme for that.

How to map shared Content Blocks to Templated in Sitefinity 5.2?

I just Migrated my 3.7 website to 5.2 Website, but I noticed that the Generic Content in 3.7 Project have been converted to Shared Content blocks in 5.2. And most importantly not all (only few are likned to pages, i.e., Used in pages column has "Not used" value).
I searched a lot but couldn't find any way to map these blocks to the pages as they were in 3.7 Project.
However, I was trying to follow tutorial:
http://www.sitefinity.com/documentation/documentationarticles/user-guide/widgets/content-widgets-group/configuring-the-content-block-widget
But I didn't see any option such as "Select from existing shared content button" in Edit Template mode, I get this option in Edit page mode & when I set the Content by selecting the existing Content it's not displayed in View mode, but it's displayed in edit mode.
Any ideas how to do this?
Thanks
With the introduction of Sitefinity v4, shared content is no longer available for templates, just for pages. They removed that ability unfortunately due to architectual reasons and performance issues.
The official comment on how to solve it at the moment, is by using inherited templates, where you drop a normal content block on a 'parent' template and thus its child templates inherit it while keeping a single point of edit.
As a non-recommendation 'hack', you can activate it, as described here. But keep in mind the response from Telerik:
it will lead to performance problems. This is why this feature is
disabled by default, and we do not recommend using it.
But there is also good news when you read the Sitefinity 5.3 roadmap which is scheduled for release end december 2012:
The 5.3 release includes the below improvements:
Shared content is now available to use inside page templates
Hope this helps,
Jochem.

How to add a skin engine to asp.net MVC system

I'm implementing a solution in ASP.NET MVC that later can be applied to couple of other fields. To do so it will require to re-brand the UI even though the underlying business logic wont need to change. I'd like to write the code in such a way that will allow other developers to only develop code that will only changes the UI. This is similar to the way that themes can be written against Wordpress Blog software.
Can any one suggest how to organize my project to make such feature work?
http://pietschsoft.com/post/2009/03/ASPNET-MVC-Implement-Theme-Folders-using-a-Custom-ViewEngine.aspx
I would not use bult in Themes (not actually sure if these still exist in MVC) But you could multiple sets of CSS (with related images) in a Themes folder with a separate path per theme eg: Themes\Default, Themes\Classic, etc where the only configuration is the Path element. This would split the styling from the core code and you would'nt need to use any Theme "Engines" etc.
In your MasterPages/Pages/Views you could just set the path to the stylesheets dynamically.
Have you tried using MasterPages?

Looking for a page designer

My site currently has some static pages. I'm looking for a rails wysiwyg webtool with which I can change those static pages (with images) dynamically. The number of pages is fixed and I don't have to be able to dynamically add new.
Update
The site already has a design template assigned which I don't need to change. I only need to be able to change the content of some of the pages.
Someone can suggest me something?
Thanks
Stijn
Are you looking for a server site tool that facilitates editing static HTML files but uses a web browser interface?
If so I think that only solves part of the problem. You pages still have, presumably, some common "furniture" like a Banner pane, Left pane, Right pane, Footer. If you want to change these you will have to edit every file. What about if you have telephone number in the Banner - if that changed it would be better to just change that centrally.
These are problems that a Content Management System addresses, so if you are not familiar with that you may want to read up on CMS.
To compare CMS systems see: http://cmsmatrix.org/matrix/cms-matrix?func=search
You can enter "Rails" or maybe "Ruby" in the Language field of the Search form
Try Radiant CMS

Resources