Copied to clipboard

Flag this post as spam?

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


  • Adam 6 posts 27 karma points
    Sep 14, 2011 @ 20:26
    Adam
    0

    Referencing the appliaiton's root path

    Hey Anthony,

    Let me start by saying I really like the uBlogsy project and I am really looking forward to the 2.0 release.  You have obviously put a lot of thought and work into the project.

    Now, of course, I have a request.  When possible, could you use the application path when referencing controls or script files?  I am asking this as our Umbraco site is setup as an application to our existing website.

    Example:

    examplesite.com (Very large propriety website)

    examplesite.com/blogs  (Umbraco site used for blogging and CMS)

    In our setup, Umbraco is added as an application to our main website in IIS. This causes an issue when resolving paths to the root directory.  To avoid these issues, I make the following modifications using the tilde (~) character. The (~) represents the root directory of the application in ASP.NET.

    1. Update paths in the Razor script files to reference content using the (~) character:

                          Example: Change

    @RenderPage("/macroScripts/uBlogsyShowPost.cshtml", n.Id)

    To:

    @RenderPage("~/macroScripts/ uBlogsyShowPost.cshtml", n.Id)

    This is minor, and since it is in the razor script files, it may be an expected update.

     

    2. Update path referenced in uBlogsy C# code to use the (~) character.  I have only run into one place where this was an issue.

    In ublogsySourceCode\1.33\uBlogsy\uBlogsy\usercontrols\uTagsy\uTagsy.ascx.cs (line 26) update:

                private const string FILE = "/usercontrols/uTagsy/settings.json";

     To:

    private const string FILE = "~/usercontrols/uTagsy/settings.json";

     

     

    Besides the request above, I have one more request? Would it be possible to post the 2.0 beta code?  I cannot test with the built package as I can’t make modification #2 above. Also, this would allow me to test how some of the new features work in our site/application environment.

    Thanks again for your hard work.

    Adam

  • Adam 6 posts 27 karma points
    Sep 14, 2011 @ 21:09
    Adam
    0

    Sorry, the title is supposed to say:

     

    "Referencing the application's root path"

    I get an xml parsing error when I try to update the title.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Sep 14, 2011 @ 22:27
    Anthony Dang
    0

    Hi Adam

    Thanks for the suggestion.

    Regarding utagsy (soon to be released as a separate package), you can replace it with the built in umbraco tags datatype....it's just a csv.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft