Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have started my first project in 5.1 (Wohoo!) - so now I have to learn a whole bunch of new stuff :-)
Probably I haven't paid enough attention, but I'm confused about the file structure in this version. I have finally found my stylesheets and scripts by using @Url.Content in my templates.
But how is the media items stored? Is it really necessary to type /Content/Media/8f890a7c35474dcd97d74cde3c585f69/css-sprite.png in my css to get as background image? Or is there another simpler path?
Thanks for your help!
You don't need to use @Url.Content to resolve your paths; the paths would resolve without it, but the structure is a bit confusing. As for your background you have a couple of options. If your background image is static and unchanging, then just upload it to an 'images' folder (your own folder that Umbraco doesn't tamper with) and reference it with a friendly path. If your background is changing and dynamic (i.e. can be selected by users from the media section) the you would use some script and the API to get it by id, or some other distinguishing property.
Thanks for the headsup.
Another thing I would like to have confirmed is the use of Razor and Templates: As I understadn it there are no master pages anymore. It is now "views". The templates in Umbraco i supposed to be very clean and pure html (the layout). The dynamic coding should be in the partials folder (i.e. navigation, meta). And macros are used for dynamic code that needs inputs from a user or things to be used by content creators (i.e. videos in the rich text editor, forms).
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted