Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kasper Dyrvig 246 posts 379 karma points
    May 24, 2012 @ 10:24
    Kasper Dyrvig
    0

    What is the Umbraco 5 file structure?

    Hallo anyone!

    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.

    <link type="text/css" rel="stylesheet" href="@Url.Content("~/content/styles/basic.css")" />
    <script type="text/javascript" src="@Url.Content("~/scripts/jquery/jquery.js")"></script>

    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!

  • Grant Thomas 291 posts 324 karma points
    May 24, 2012 @ 10:36
    Grant Thomas
    0

    Kasper,

    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.

  • Kasper Dyrvig 246 posts 379 karma points
    May 24, 2012 @ 11:31
    Kasper Dyrvig
    0

    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).

    Correct?

Please Sign in or register to post replies

Write your reply to:

Draft