Questions tagged [layout-page]

9 questions
13
votes
5 answers

MVC3 Layout Page, View, RenderPartial and getting script files into the Header (from the partial view)

So I have a Layout page @RenderSection("HeaderLast", required: false) A view @section HeaderLast { }
Chris Marisic
  • 32,487
  • 24
  • 164
  • 258
6
votes
4 answers

How to implement logic at "masterpage" level

I'm still new to MVC, so bear with me :-) I've got a community site I'm working on, and I'd like to show how many users are online on all my pages after the user's been logged in. I've got a shared view which is used as layout for all pages after…
Steffen
  • 13,648
  • 7
  • 57
  • 67
3
votes
1 answer

How do I implement Infinite scroll on SharePoint Layout pages?

I've tried to implement Infinite scroll on Microsoft SharePoint Server 2010's layout pages, but I failed to implement it. My guess is that $(window).scroll or $(window).bind('scroll') wasn't apply to the layout pages, How do I implementation this?
2
votes
0 answers

Razor Engine with layout page outside of a web project

I am currently using the razor engine in a class library to render HTML for emails for an application. This is working fine but as the number of email templates have gone up I would now like to implement master pages as well. Is it possible to do…
Richard Mannion
  • 289
  • 5
  • 17
1
vote
1 answer

Remove a section from _Layout.cshtml

In my master view (_Layout.cshtml) I have a tree-menu. I want to remove that tree-menu in the main page (home). The rest of the layout should stay there, I want the body of the home to occupy the space of the tree-menu. Any efficient in-the-box…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
0
votes
1 answer

How do I use @section Scripts with child layout page in asp.net core 3.1 mvc?

I have a master layout and then a child layout for certain views. In the master layout, I have: @RenderSection("Scripts", required: false) The child layout references the master layout itself. But I keep getting an exception on views where there…
D.Man
  • 179
  • 1
  • 15
0
votes
2 answers

How do I render a script in a master layout

I have 2 layout pages, One is a Master layout. This has basic layout that all my pages will use whether a user is logged in or not. The other is what i have called an Authorised layout, which is a layout view for users that are logged into the…
floormind
  • 1,868
  • 5
  • 31
  • 85
0
votes
0 answers

Dynamic Menus are loading again during clicking Menu in the Layout page - MVC4

I am loading menus dynamically in the layout page from the database. So, I used Partial View to achieve this. This is my code: I have created a Models class called "MenuModel": MenuModel.cs public class MenuModel { public List
thevan
  • 10,052
  • 53
  • 137
  • 202
0
votes
2 answers

Zend Framework 2 - Make content page variable accessable in layout.phtml

I want to build a fancy headline container which - you'll never guess it - contains the title of each page displayed. In Django you can either create a variable in every view which is passed to the layout page or define a block which is filled with…
Ron
  • 22,128
  • 31
  • 108
  • 206