Hi Alex, I just had a look at uSiteBuilder and I wonder if it is for U7, because it is still mentioning master pages and user controls. They're not for MVC, are they?
EDIT: I just noticed there is a newer version but couldn't find the website for it. It looks very interesting, do you know if it takes time to learn? And is there any tutorial for the new version? Thanks again!
Version 2 of source code of uSiteBuilder for Umbraco has been moved to GitHub (https://github.com/spopovic/uSiteBuilder).
The following is a list of all the major improvements:
Initial sync has been updated and is now a few times faster.
Caching of loaded types/classes for faster analysis of inheritance of document types.
Suppress Sync option added (configurable)
Option to specify which assemblies contain your assets (document types, templates, etc.). This is an optional configuration setting which can improve initial load significantly since we would not load all assemblies from the bin folder and inspect them all when looking for your assets during the sync process.
Lazy loading of property values has been implemented.
uSiteBuilder can now be used on MVC projects and the model is strongly typed.
Supports Umbraco CMS v6.x and v7.x projects.
How to get child nodes in layout (.cshtml)?
This is what I am doing
Below is the code circled red (where the error is):
@foreach (var slide in Model.Children)
I think you used to be able to do something like that in Umbraco 4.7 (or I may have missed something)
Anyway, how do you loop through the child nodes correctly?
Thanks in advance
Hi Hardi,
Try to use 'Model.Content.Children'.
Thanks, Alex
Hi Hardi,
In addition to Alex post I would like to add.
In Umbraco 7 you have two different options. You can use dynamic razor, by using the @CurrentPage, so in dynamic it will looks like.
And you can use the strongly typed razor as Alex shows in his post
The documentation can you find here http://our.umbraco.org/documentation/Reference/Templating/Mvc/views and http://our.umbraco.org/documentation/reference/templating/mvc/partial-views
Here a some documentation about how to converting a PartialView Macro from a legacy RazorMacro Script http://our.umbraco.org/documentation/reference/templating/Macros/Partial-View-Macros/#ConvertingaPartialViewMacrofromalegacyRazorMacroScript
Hope this helps,
/Dennis
Also you can use uSiteBuilder for creating strongly typed models and then using it in views. ))
/Alex
Perfect! Thanks a lot Alex and Dennis!
Now, do you guys know if the following code can be shortened?
Hi Alex, I just had a look at uSiteBuilder and I wonder if it is for U7, because it is still mentioning master pages and user controls. They're not for MVC, are they?
EDIT: I just noticed there is a newer version but couldn't find the website for it. It looks very interesting, do you know if it takes time to learn? And is there any tutorial for the new version? Thanks again!
Hi Hardi,
Look at : http://www.vegaitsourcing.rs/#!/articles/2014/03/usitebuilder-v2-release-notes
Version 2 of source code of uSiteBuilder for Umbraco has been moved to GitHub (https://github.com/spopovic/uSiteBuilder). The following is a list of all the major improvements: Initial sync has been updated and is now a few times faster. Caching of loaded types/classes for faster analysis of inheritance of document types. Suppress Sync option added (configurable) Option to specify which assemblies contain your assets (document types, templates, etc.). This is an optional configuration setting which can improve initial load significantly since we would not load all assemblies from the bin folder and inspect them all when looking for your assets during the sync process. Lazy loading of property values has been implemented. uSiteBuilder can now be used on MVC projects and the model is strongly typed. Supports Umbraco CMS v6.x and v7.x projects.
It's just some way of coding ))
Thanks, Alex
is working on a reply...