Copied to clipboard

Flag this post as spam?

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


  • Asif Malik 203 posts 339 karma points
    Apr 17, 2013 @ 11:17
    Asif Malik
    0

    Create folder to seperate razor scripts

    Hi, i have a rather basic question, essenitally i have a lot of razor scripts and  am thinking about adding folders to the macroScripts folder. I have done a quick test and everything seems fine, but just wanted to find out if this may have any unforseen issues going forward ... has anyone tried this?

    Also i am planning to create a folder called Shared where i keep all the shared razor files, all of which would probably be accessed from within razor scripts using the @RenderPage("~/macroScripts/Shared/filename.cshtml") syntax, is there a better way? ... should i follow the underscore naming convention.

    Any guidance (best practise) advise would be appreicated. I am using Umbraco 4.11.6 and am using WebForms as the rendering engine

    Thanks

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Apr 17, 2013 @ 20:28
    Jeavon Leopold
    0

    Hi Asif,

    Yes, you can create sub folders in the macroScripts folder without any problems and also using @RenderPage is the best way to render additional razor scripts.

    Good luck!

    Jeavon

     

  • Asif Malik 203 posts 339 karma points
    Apr 18, 2013 @ 10:15
    Asif Malik
    0

    Thanks for your response Jeavon much appreciated

Please Sign in or register to post replies

Write your reply to:

Draft