I have setup a new master page.
I also have setup a partial view reference within the master page.
I only want that partial view to show on the the home page.
Going over the structure of master pages and content pages how do i reference on a content page? How would i put the following reference to a partial view within a content section on a single page?
It works fine if i put directly within the master page. In my scenario this will be in a cell of the master page.
thanks
i.e.
@Html.Partial("/App_Plugins/Articulate/Views/displaySingleTopBlogItemsonHomepage2.cshtml")
What confused me is...
a) you have master pages, then template pages then content pages (3 levels)
The master page has base html structure and references to css, the template page references the master page and has additional html structure. On top of both those levels you have a page/content page.
It doesn't appear that you have direct access to the html within the content page (like you do for master and template pages)
It sort of appears like admin's are to have rights to master and template pages and then you would give editors the ability to manage the content pages (adding html through gui).
Partial View within a content section?
I have setup a new master page. I also have setup a partial view reference within the master page.
I only want that partial view to show on the the home page.
Going over the structure of master pages and content pages how do i reference on a content page? How would i put the following reference to a partial view within a content section on a single page?
It works fine if i put directly within the master page. In my scenario this will be in a cell of the master page.
thanks
i.e. @Html.Partial("/App_Plugins/Articulate/Views/displaySingleTopBlogItemsonHomepage2.cshtml")
Hi Dave,
In the Master page you need to add
@RenderBody()
.And than in the content page you need to set layout of the master page.
Hope it helps.
Regards,
Urvish Mandaliya
You can also call partial view in content page.
It this is not the case than if you can explain more , so we could have idea what is the issue.
Regards,
Urvish Mandaliya
What confused me is... a) you have master pages, then template pages then content pages (3 levels)
The master page has base html structure and references to css, the template page references the master page and has additional html structure. On top of both those levels you have a page/content page.
It doesn't appear that you have direct access to the html within the content page (like you do for master and template pages)
It sort of appears like admin's are to have rights to master and template pages and then you would give editors the ability to manage the content pages (adding html through gui).
Is this the right thinking?
Hi Dave,
Its right you can give rights to the Editors to manage content pages.
And ultimately you content page would display as a page.
So whatever your site structure is , you can use partial view to display content.
Regards,
Urvish Mandaliya
is working on a reply...