45 votes
Cultiv Razor Examples
I've seen this question many times in the past few months: "Help! How do I use datatype X with Razor?!". This package gives you the answer for the 40 most popular datatypes. Included in this release are:
- All of the native datatypes built into Umbraco (15 datatypes)
- All of the uComponents datatypes (23 datatypes)
- Digibiz Advanced Media Picker (DAMP) datatype
- Google Maps datatype
There's more to come in the future, both new datatypes and variations on the current datatypes. I also plan to include some good examples of using Razor to select nodes and present your site's data in cool new ways.
Install
This package comes as a pre-installed Umbraco environment with the datatypes fully configured and content setup to use them. It is easy to start using this by opening it in Web Matrix:
- Download the zip file
- Don't forget to UNBLOCK the zip in Windows 7!
- Unzip this into a folder of your choice
- Right-click the folder and choose "Open as site in Microsoft Web Matrix"
- Hit the "Run" button in the toolbar at the top
- The site should open now
Credentials
To get access to the backoffice, go to /umbraco/umbraco.aspx and enter the username demo and the password demo.
Goodies
There are some more Razor goodies built into this site, which you can explore for yourself (the "Cool stuff" node is one of them, now only featuring how you would group nodes).
4.7.1 only!
A word of warning: This only works with the Umbraco Razor engine that will be included in 4.7.1. These examples will not work in 4.7.0.
I can highly recommend upgrading JUST the Razor engine of your site to the future 4.7.1 version (it's been very stable), all you have to do is look for umbraco.MacroEngines.dll in this package and copy it over to your own site's /bin folder and you're done.
Questions?
Changelog
v1.1.0
- Added events with grouping (by type and in groups of 3)
v1.2.0
- Replaced .GetPropertyValue("prop") != string.Empty with the more elegant .HasValue("prop")
v1.3.0
- Replace the truncate helper with the built-in Library.Truncate method
v1.4.0
- Upgrade to 4.7.1 final release
v1.5.0
- Added breadcrumbs
- Added gallery on the homepage
- Added navigation that indicates if you're on a page in the menu (or on a childpage of that menu item)
- Implemented an attractive template
- Package Files
- Documentation
- Archived Files