Copied to clipboard

Flag this post as spam?

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


  • Patrik 10 posts 30 karma points
    Nov 18, 2011 @ 23:44
    Patrik
    0

    Let me decide the URL structure myself, please?

    Not sure if this is the right forum, but I'll go ahead anyways...

    I'm a brand-spankin' new user of Umbraco. So far, it's a treat compared to everything else I've tried. However, there is one thing that bugs the crap out of me. And that's the inability to determine the URL's of things myself.

    The real problem I have is that I have an entire site created in Dreamweaver. I have a master CSS file which contains about 200 differenent references of images (alot of these are sprites that are repeated, but still). All of these images have a defined, static URL such as " /_iface/obj/whatever.png ". Now, when deciding to try Umbraco I thought - naive that I am - that I could create the folder structure I wanted in the Media section and all my links would work. Sadly, that's not the case.

    Now, I have 200 or so image references to change, and I haven't even gotten to the xHTML yet!

    As if that wasn't enough, all my pages are now structured like /services.aspx and /engineering.aspx, when it in fact should be /services/ and /services/engineering.aspx or similar. Anyone working actively with SEO as I am, knows that the folder'ed structure is a whole lot better as far as Google is concerned.

    And, I see problems in the future:

    • When inserting 10 or so new images in my CSS, I'll have to upload through the Desktop Uploader, browse to each and every file in the tree, and copy/paste the URL's into my CSS code. Now, if anything was ever a hassle, that'd be it.
    • I'm planning on implementing prettyPhoto by No-Margin-for-Errors, and it has about 150 lines of CSS. Almost all of them contain image links. That's another job I'm not looking forward to in Umbraco.

    However, most of Umbraco seems incredibly smart and well thought out, so I figured there must be a better way to do this, and a way for me to use absolute URL's that are MY OWN, and not something that the system is trying to force down my throat.

    So, how do I achieve this? For me, if this isn't possible, it's a complete deal-breaker.

  • Ralph van Vugt 57 posts 101 karma points
    Nov 19, 2011 @ 00:05
    Ralph van Vugt
    1

    Hi Patrick,

    Umbraco makes distinction between images which a user can manage and images used in css and templates.

    For images used in css and templates, such as backgrounds, static template images and so on, you can create a seperate folder in your umbraco folder, just as you would with html. You can simply upload the folder with your css and template images to the root of your umbraco install, so the path in your css file stay the same.

    Images which the user can manage, such as headerimages for example or images in content areas, are managed in the media section. By using media datatypes on your DocumentType, you can specify where the users image will appear in your template.

    The folder structure e.g. urls without .aspx is a setting in web.config. Set umbracoUseDirectoryUrls to true. The folder-structure is managed in your content tree. The structure of pages and subpages in the content tree also structures your urls.

    Hopes this will help you.

    Ralph

  • Patrik 10 posts 30 karma points
    Nov 19, 2011 @ 02:01
    Patrik
    0

    @Ralph

    Yes, that helped immensely! I wasn't even aware that anything I put in that folder would be publicly accessible.

    Thanks so much!

Please Sign in or register to post replies

Write your reply to:

Draft