Copied to clipboard

Flag this post as spam?

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


  • James 251 posts 1169 karma points
    Jul 19, 2014 @ 15:22
    James
    0

    Rendering Child Items With Macro

    When i render child items with a macro and then list page.Url.

     

    The Url is say for example :

    www.domain.com/portfolio-item/

    It adds a slash on the end of the url. This causes it to not get the CSS from my stylesheets.

    How i can i remove this forwards slash by default?

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Jul 19, 2014 @ 15:58
    Jeavon Leopold
    100

    Hi James,

    There is a setting to not have the trailing slash however generally people prefer it for SEO and other reasons...

    Instead I would recommend that you make the references to your css absolute with a preceding slash, e.g. "/css/mycss.css" then it will work correctly from anywhere.

    If you really want to remove it change the "umbracoUseDirectoryUrls" app setting in web.config to false.

    Jeavon

  • James 251 posts 1169 karma points
    Jul 19, 2014 @ 16:00
    James
    0

    Thank you Jeavon.

     

    Quick reply. Didnt realise it was that simple of a fix. I just put "/" before all my CSS references.

     

    Thanks again for your response.

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Jul 19, 2014 @ 16:06
    Jeavon Leopold
    0

    You're very welcome! I just posted a link in your other topic to the "Creating a basic website" guide, I would highly recommend a read.

    Also Umbraco.tv has some excellent video tutorials http://umbraco.tv/videos/umbraco-v7/implementor/ (some of them are free and some require a subscription)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies