Where are models added? - umbraco

(My apologies for all those that voted the question down. I'm not trying to avoid researching. I've been actually trying to find a way for doing this for the past several hours. The only thing I'm trying to avoid is paying the Umbraco TV membership fee)
This is probably a dumb question:
I'm somewhat familiar with MVC, but really new to UMBRACO 7. I'm going through documentation on how to add restricted pages (pages accesible to some membership types) and I have to create a model. I've been searching through the whole UMBRACO settings and developer back office pages but couldn't find where to add the models. Neither was I able to find in VS where to add them (which would be even more convenient).
Can someone point me in the right direction or any documentation where I would be able to understand how Umbraco and MVC+VS work together and add models and custom code to an UMBRACO 7 website?
(I have the site running locally in VS2013 and DB in MSSQL Server 2014)
THANK YOU KINDLY!

I would recommend you read up on Umbraco surface controllers. You can learn a bit about what it is and how it works here: http://our.umbraco.org/documentation/Reference/Mvc/surface-controllers
To answer your question, you put your models where you always put model classes in MVC: Pretty much where ever you like in the solution. However, it would be pretty good idea to put it in a folder & namespace called Models.

When I want to restrict access to pages in my umbraco site, I usually find that I can use the default "Public Access" that umbraco has set up. Just right click on a node in the content tree, and you should be able to restrict access to either specific members or a specific member groups.
https://our.umbraco.org/wiki/reference/umbraco-client/context-menus/public-access

Related

Integrating existing Umbraco website design in ublogsy blogs

I'm developing a site in umbraco, and integrating uBlogsy (blog) in it.
But the problem is, uBlogsy offers its own look n feel. However i want to have my existing website design in Blogging part as well.
here is the link for the same :
http://our.umbraco.org/projects/starter-kits/ublogsy
I've done that manually. but its a time taking process.
Does any one knows, how can i do that? is there any automation available for the same?
Or if there exists any better blog than uBlogsy offering same feature and functionality?
Thanks in advance.
uBlogsy is the de-facto blog package for umbraco so i'd be surprised if you find anything better (the community is encouraged to build upon the best instead of spin up many sub-par competitors, but i digress).
I've done that manually. but its a time taking process.
^^This sounds like you have modified the cshtml markup and css from the package. This is indeed the way to go.
There isn't really any plug-in theming that i'm aware of and it sounds like this is what you're looking for, right?
I've used uBlogsy many times on past projects and usually don't keep anthonys files for template views but rather start with fresh markup to match my wire-comps. Since his files are included - they make a great example for how-to access the data.
Sorry it's probably not what you're looking to hear. But i think it ultimately gives greater control and better result to get hands-on.

Should I move my solution to Orchard CMS or add everything manually?

At the moment I am building a big project using:
ASP.Net MVC 4
jQuery (With some extra libraries)
Castle ActiveRecord (based on NHibernate)
Implemented users and roles using .Net Membership Provider
I built almost all the website, but some very relevant parts are missing still and I noticed that this CMS supports
ASP.Net MVC and NHibernate, and have almost all the features that I need already implemented.
The features that I still need to implement are:
Internal Search Engine
Comments
Version of content
Chat betwwen users
Users Profiles Page (Something like a very basic social network)
Forum
SEO
I don't know if is harder to use the CMS or if is better to add the features one by one manually.
I am worried about the time I spend learning and adapting to Orchard is the same time I would spent adding this
features manually.
Basically, the question is:
Should I move my solution to Orchard CMS or add everything manually ?
You can't just move your solution to Orchard, you could but i won't recommend it. Orchard is still MVC 3 at the base and that way most should work if you just move your solution including the database etc. But if you ask me, spending time to add the features manually is the way u should go.
In the Orchard Galery you can find existing many modules
Internal Search Engine
Lucene (Fully functional - Writen by the Orchard Team)
Comments
Already exists in the Orchard Core Module
Version of content
Already exists in the Orchard Framework functionalty
Users Profiles Page
Profile (Fully functional? Or at least good enough as example)
SEO
Several modules
Only 2 features u will have to write yourself
Chat between users
I can't find any example code for this, but I know Piotr Szmyd has tested SignalR inside a Orchard Module which, I think, will be usefull for a Chat module. Demo is here.
Forum
Nicholas Mayne made a start of a forum module which can be used as example or starting point, maybe you can help him extent it? Currently it's sort of a pre-alpha version :(
+1 to rfcdejon's answer. I ported my current project to Orchard after at 50-60% complete. I wish I had done it sooner due to the learning curve and time to integrate all the stuff I had already written, but overall it was the right choice.
If you have significant data already set up you should account for the extra time it will take to port that into Orchard. But if you are making an app from scratch with very little existing data that would make the switch to Orchard easier. Orchard is a great choice for anyone looking for a .NET CMS that supports MVC.
Some things to keep in mind:
Features you've already built will have to be converted into Orchard content types/parts in order to take advantage of things that come out of the box with Orchard, like search, comments, versioning, etc.
Orchard has its own users/roles system, so you might have to do some work to find a module for what you're already using, or override Orchard's user/membership system yourself.
Your entire app will have to become an Orchard app, and your existing MVC stuff will have to convert into an Orchard module. Existing data access code will have to be wrapped inside a using (new TransactionScope(TransactionScopeOption.Suppress)) {...}
Forums project has started but isn't done, so you will either be banking that it will finish in time for you to use it, or that you will be able to help get it working.

Orchard for custom websites

I've just installed Orchard and created a sample site. I want to evaluate this CMS to see what it's capabilities are if I could choose it for my CMS of choice for ASP.NET MVC based sites. Has anyone used it to run a custom, highly modified website? Unfortunately no sample sites are provided at Orchard site to see it in action.
I know what my requirements will be and those are quite demanding. I have my own little CMS in ASP.NET MVC 2 which I tailor to my needs anytime I want but it lacks a lot of functionality that you get when you have a bigger team of developers at your disposal like the Orchard has.
The best way to reply to this question is if you can provide some insights into customization and if you can provide a link to a working site.
There are a couple sites out there.. Here are three I have worked on...
These two were for a University, they have a contact us page, Payment system, and also hooks in to multiple databases with a large set of business logic for students and payments. The Registration system also has an updated menu template to deal with drop downs.
http://housing.bathspa.ac.uk/ (v0.5)
http://registration.bathspa.ac.uk/ (v0.5)
My blog jsut has a modified theme which was enough to get me up an running.
http://www.themayneissue.com/ (v0.5)
There are a few open source modules I work on as well..
http://orchardopenauth.codeplex.com/
http://orchardblogml.codeplex.com/
These also allow for customization of the Orchard system
There are two community sites using Orchard, Orchard Gallery and NuGet gallery.
For now me with my team is being writing an appication for nearly two months using Orchard and the only thing I can say is that it is awesome!
Yes, Orchard is very simple for now, but it is so powerfull in the same time. I just love their dynamic shapes and content types. Use it and you'll love it!
And as a bonus:
Just get code from repo and look through it, it shines like a diamond (the only problem is lack of comments). I am sure every MVC developer will find a lot of stuff to learn from it.
There is another web site developed using orchard.

Adding content to umbraco?

I recently made the decision to develop our new company website (http://www.idealcode.net:8005/AboutUs.aspx) with Umbraco. I hired an Umbraco developer and we started work.
Please don't flame me or anything but I'm starting to worry about my decision.
The main reason why is because I seriously cannot find anything that explains in simple terms the workflow for creating a new page. As a web developer, it seems as much work to create a page in Umbraco than creating one outside of a CMS.
The workflow as we have it is:
Create a master page (probably not required for every page, but in practice seems to be on almost every page)
Create a document type with the PRECISE content areas that will be on the page
I guess at this point our end users can actually create a page...
We spent about 10 hours implementing the blog module and it STILL does not work and the dev needs to customize the template.
As a web developer, I honestly wonder how this is going to save us time? I'm not trying to diss Umbraco--I'm just worried about explaining this to my superiors. I could have created a site with some dynamic areas and blog in ASP.NET MVC in the roughly 20 hours we've spent on this so far...
The best way to get up to speed quickly on Umbraco is to look at the screencasts made from Umbraco corporate:
http://umbraco.tv/products/umbracotv
After that, the Umbraco community is quite good at answering questions and helping out:
http://our.umbraco.org/
As far as your specific question:
I could be wrong, but I think the thing that you aren't leveraging is inheritance. This makes things easier in Umbraco.
First, DocumentTypes can have parents and they inherit the data fields from those parents. For example, a Content Page DocumentType could have the meta information, main content area, and intro text.
Many pages within your site will likely go no further than that. Basically a rich text editor page (think "About Us")
Then when you add the News Item DocumentType, it can inherit all of those fields from Content Page and simply add a Date and Image field (as an example).
DocumentTypes can have many templates available to them. So if the data doesn't change, but the markup (design) does then you can set a new template in the Properties tab.
Templates can have parents as well. So you can build them up like this:
Main Template
|____One Column Layout
|____Generic Content Page
|____News Area
|____Two Column Layout
|____Product Compare
This works just like master pages in ASP.NET.
So this is pretty long winded. Maybe I'll think about a blog post. Does this help at all?
I second your thought, but consider following scenarios:
Umbraco or any CMS is no ideal solution, if:
1) The complete site will end up having only 20 pages
2) There is only a single user / editor of the site
3) The content is not much dynamic and once created will not change over couple of years
4) The site have only maximum 10 end users
5) The data is not pulled from any external source or/and all are static pages
Where as a CMS / Umbraco is solution for:
1) The is dynamic and still growing after first 1000 pages
2) The client have multiple editors and want to maintain history of publications
3) The content is pulled from various external sources
4) Site end users/contributors are 100+ and still growing
5) Last but not least, the site have 1000+++ visitors daily
I can go on and list all the possibilities of having CMS at the first place, but you need to decide and analyse your own requirements. There is no point in deploying a Samurai to kill a mouse, but definitely you should have proper equipment if you are going to hunt a tiger :D, joke apart just don't deploy any CMS for sake of learning.
Mean while, have a look in books available on Umbraco site to get started (http://umbraco.org/get-started/for-developers) or install Runaway module to start with.
Sanjay Zalke
>As a web developer, I honestly wonder how this is going to save us
time
It will save you time once you become proficient. It has a learning curve for sure, but once over that hump it will save you time - (that is not unique to Umbraco). I have used other CMS products that were easier to get my first site up - but then I was disappointed that I pretty much maxed out what the CMS could do for me - so far it doesn't appear that I will outgrow Umbraco's capabilities anytime soon.
Umbraco can be a wise choice if your site content is very dynamic with lots of pages.
The USP of Umbraco is the re-usability of the document types and a clear seperation of mark-up and content. It greatly reduces the headache of the site editor.
Although initially it may seem a bit confusing or i would say intimidating, but with the help of web-casts on http://umbraco.com/help-and-support/video-tutorials and the user forums things can get simpler.
I started using Umbraco a month back and so far experience has been good.
Start thinking about your site in terms of what is in common from one page to another. If every page in your site needs its own master-page than something is wrong. A good site layout will include the flexibility you need from one page to the next, but still enforce consistency and a common design.
Once you have the common elements of all the similar types of pages, start defining document types for this various types of pages. For example, you might have Basic Page document type, a News Item document type. You can define the various other pages, like "HomePage" or "Section Home", etc. If you have a slideshow, you could create a document type for each "slideshow Slide", etc. Umbraco allows you to build out a very flexible content tree very quickly, and is one of its biggest advantages.
Even if I am the only developer on a site, I still prefer using Umbraco over building a non CMS site. Once the site architecture it determined, development becomes very fast.

Has anyone got any experience developing a site based on WebQuarters?

I'm in the process of planning out a site for a friend, they need to be able to modify site content, have a products section and shopping/ check-out area. All the products need to be able to be updatable too (descriptions, photos, cost - including delivery, etc).
As I'm a bit of an ASP.NET MVC fanboy currently, I was going to build a quick CMS in my spare time, however, a friend just pointed me at WebQuarters - an open source MVC based CMS.
So, my question is this - given the requirements, does it make more sense to build on top of WebQuarters or go my own route?
Additionally, does anyone have any experience of using WebQuarters...is it any good or should I steer clear?
Thanks,
Kieron
I've been looking at this as well and trying to see how suitable it will be for a similar project I will be starting soon. So far it looks good, but some of the admin parts when your editing your pages don't feel quite as solid (like editing the menu order).
I'm keeping an eye on it though, I think it will be a great library to add to your tool chest.

Resources