More in this section

Forums / Developing with Sitefinity / asp include statement

asp include statement

6 posts, 0 answered
  1. Rob
    Rob avatar
    9 posts
    Registered:
    11 Aug 2011
    11 Aug 2011
    Link to this post

    Good day,

        We have just started using Sitefinity and was wondering if you can actually do an #include statement in the html code? I have tried it with no success. I may be going about this backwards as is there a widget or some way of mimicking the include statement with Sitefinity? 
    Thanks,
    Rob

  2. Veronica
    Veronica avatar
    125 posts
    Registered:
    30 Jan 2015
    12 Aug 2011
    Link to this post
    Hello Rob,

    Could you please be more specific on where are you trying to add the "#include" statement and for what purpose?

    Kind regards,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Rob
    Rob avatar
    9 posts
    Registered:
    11 Aug 2011
    15 Aug 2011
    Link to this post
    Hi Veronica,

       What I was trying to do was add an include statement , <!-- #include virtual= "xxx/test.html"-->,  in page edit mode source view.  One purpose is that on that include page it has a navigation menu. I thought of doing a template but then each page the include would be on are completely different in layout/design so template would not work. Because of the number of pages adding the navigation into each page would be a bit of a pain instead of adding the one include statement line. Have not used and CMS in the past so still getting use to it and may not just know another route to take instead of an include statement.

    Thanks for your help and any suggestions.

    Rob
  4. Veronica
    Veronica avatar
    125 posts
    Registered:
    30 Jan 2015
    16 Aug 2011
    Link to this post
    Hello Rob,

    As I understand the purpose of the <! -- #include --> statement - you use it to add a  menu to all your pages. Well in that case why don't you use a Master Page?  

    All the best,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Rob
    Rob avatar
    9 posts
    Registered:
    11 Aug 2011
    16 Aug 2011
    Link to this post
    Hi Veronica,

        I had used master page in Visual Studio 2010 but since the master is one design layout much like using a template, I would have to create several master/template pages.  I could maybe use one master  for 5 pages but the remainder of the pages that require the include are a different layout so a different master would have to be created. The menu will be at the top on some pages, on the side on some and even some pages just plain text in the footer so it is not consistently in one spot.  I was just trying to avoid making up several templates or master pages and instead just use the include statement in the location it is required for that particular page.  Hopefully that makes sense on what I am trying to do. In the end I may have to create several templates - correct?

    Thanks - Rob
  6. Veronica
    Veronica avatar
    125 posts
    Registered:
    30 Jan 2015
    19 Aug 2011
    Link to this post
    Hello Rob,

    Yes, in my opinion the best way up to now is to create several templates according to your needs.

    Regards,
    Veronica Milcheva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
6 posts, 0 answered