Transforming a Static Website into Umbraco Managed
Hello Web Enthusiasts
The way I usually build a website is, first I draw up the design in Photoshop and once I'm happy with that, I then transform that design into static HTML & CSS. Now however I want to implement a further, third step and that is to use a Content Management System to make the site dynamic and interesting.
Because I love the MVC Architecture, I have decided that Umbraco 5.xx will be the CMS I shall use for me and all my future clients' websites.
Right now I have an awesome looking static website (HTML5 & CSS3) but I am unclear on how I should proceed in applying Umbraco's awesome power to it.
I have a Root DocType, I figured I'd use that to house the Meta Data, Header and Footer for my website. I have also gone ahead and created a Razor template for the Root, at the moment the template only contains the links to the various CSS and Script files. But I am confused on how I should proceed.
Here is one of my many dilemmas, but I feel if I can solve this, I'll be able to solve the others.
These are the three social media links in my website's header. How can I
allow the users of the site to add/remove a new social media icon for a
new future social network ? I know that this would involve four pieces
of input from the users, these are:
Social Network Name (for anchor tag name)
Social Network Profile URL (for href attribute of anchor tag)
Social Network icon (image)
Alternate Text for Social Network Icon (alt attribute on image)
Knowing the above, I would greatly appreciate it if someone could tell me what the best way to proceed would be.
You could create a Media Type which would comprise the elements required, for instance:
Create a new Media Type named 'Social Media Link*',
construct the type by adding its parts using the 'Properties' tab**,
create another Media Type named 'Social Media Links'***,
allow 'Social Media Link' items to be a sub-item of 'Social Media Links'
Now you can create a dedicated node in the Media section with a descriptive name, and of the 'Social Media Links' type we just made; now they can add sub-items to this folder only of type 'Social Media Link'. You can then proceed to get this node (probably by Id, but there'll be other ways) within a Partial or something, and iterate its children generate the output.
*Name these things what you want, obviously. **I won't explain every detail of this, I'm think you'll know how to do this as per Document Types already, and if not then it's pretty easy. ***This isn't necessary, but if it's typical users that are going to be using this, it allows us to put contraints on the items, have a distinct folder, etc. - just trying not to let them shoot themselves, and by proxy, us, in the foot.
Thanks for the reply. Here is a screenshot of what I have done. Have I followed your instructions correctly ? Or have I missed something ?
I know how to iterate over collections within the Razor view engine, but not sure what the rules are surrounding PartialView creation in Umbraco 5. When I create a PartialView in the [ Partials ] folder, it does not get saved ! Even though I press the [ Save ] button.
It seems you've told the link item to inherit from the links collection. In the 'Properties' tab of the 'Social Media Links' item, in the 'Allow children' section, check 'Social Media Link Item'. This is just to tell the CMS that users can put those types of elements under it, and nothing else. Inheritance is useful for generating composites but not needed here.
As for your Partial not saving, it will; this is a bug in the caching of the UI data.
Sorry, I should have elaborated a little on the 'bug'. I'm sure I mentioned this yesterday in another thread but can't find it as 'your topics' just bugged out on me.
If you wait between 5-10 minutes and right-click->Reload nodes you will see it appear; you might also try frantically flicking between tabs and sections and whatnot in a futile attempt to 'do something' about it - that's been keeping my temper down for the past few days at least, and I'm really new at v5 so I'm giving it a run for its money right now and will start collecting information/posting on bugs as I find and endure them. My blood isn't boiling with it ...yet.
Buuut, the place where this might have already been brought up (again, I haven't yet even taken the time to do this), would be over on the Codeplex project issue tracker.
Transforming a Static Website into Umbraco Managed
Hello Web Enthusiasts
The way I usually build a website is, first I draw up the design in Photoshop and once I'm happy with that, I then transform that design into static HTML & CSS. Now however I want to implement a further, third step and that is to use a Content Management System to make the site dynamic and interesting.
Because I love the MVC Architecture, I have decided that Umbraco 5.xx will be the CMS I shall use for me and all my future clients' websites.
Right now I have an awesome looking static website (HTML5 & CSS3) but I am unclear on how I should proceed in applying Umbraco's awesome power to it.
I have a Root DocType, I figured I'd use that to house the Meta Data, Header and Footer for my website. I have also gone ahead and created a Razor template for the Root, at the moment the template only contains the links to the various CSS and Script files. But I am confused on how I should proceed.
Here is one of my many dilemmas, but I feel if I can solve this, I'll be able to solve the others.
These are the three social media links in my website's header. How can I allow the users of the site to add/remove a new social media icon for a new future social network ? I know that this would involve four pieces of input from the users, these are:
Knowing the above, I would greatly appreciate it if someone could tell me what the best way to proceed would be.
Thank You
Ciwan
Ciwan,
You could create a Media Type which would comprise the elements required, for instance:
Now you can create a dedicated node in the Media section with a descriptive name, and of the 'Social Media Links' type we just made; now they can add sub-items to this folder only of type 'Social Media Link'. You can then proceed to get this node (probably by Id, but there'll be other ways) within a Partial or something, and iterate its children generate the output.
*Name these things what you want, obviously.
**I won't explain every detail of this, I'm think you'll know how to do this as per Document Types already, and if not then it's pretty easy.
***This isn't necessary, but if it's typical users that are going to be using this, it allows us to put contraints on the items, have a distinct folder, etc. - just trying not to let them shoot themselves, and by proxy, us, in the foot.
Hi Grant
Thanks for the reply. Here is a screenshot of what I have done. Have I followed your instructions correctly ? Or have I missed something ?
I know how to iterate over collections within the Razor view engine, but not sure what the rules are surrounding PartialView creation in Umbraco 5. When I create a PartialView in the [ Partials ] folder, it does not get saved ! Even though I press the [ Save ] button.
Thanks
Ciwan, you're getting there.
It seems you've told the link item to inherit from the links collection. In the 'Properties' tab of the 'Social Media Links' item, in the 'Allow children' section, check 'Social Media Link Item'. This is just to tell the CMS that users can put those types of elements under it, and nothing else. Inheritance is useful for generating composites but not needed here.
As for your Partial not saving, it will; this is a bug in the caching of the UI data.
Thanks Grant, Yep I have already done the Inheritance ( Allow Children ) bit.
Do we know when this bug will be fixed ? Is there like a place where we can check the progress of work on reported bugs .. etc
Thanks once again Grant.
Sorry, I should have elaborated a little on the 'bug'. I'm sure I mentioned this yesterday in another thread but can't find it as 'your topics' just bugged out on me.
If you wait between 5-10 minutes and right-click->Reload nodes you will see it appear; you might also try frantically flicking between tabs and sections and whatnot in a futile attempt to 'do something' about it - that's been keeping my temper down for the past few days at least, and I'm really new at v5 so I'm giving it a run for its money right now and will start collecting information/posting on bugs as I find and endure them. My blood isn't boiling with it ...yet.
Buuut, the place where this might have already been brought up (again, I haven't yet even taken the time to do this), would be over on the Codeplex project issue tracker.
Ah ! I got you now. Thank You Grant. I shall reply back with how I proceeded.
Thanks again.
is working on a reply...