So I have another question.
In my classical layout I have a sidebar navigation on each page. Is it possible to do this in the grid as well?
So I'll have the option to add the navigation in the sidebar like a macro?
This is how it is now, but if you browse the page, you have long bit added whitespace due to the grid set up (it's set to 8 and the side nav to 4).
http://www.don-zalmrol.be/blah-blah/
Thx, that's made it work.
But for some reason now, my grid is showing outside my website.
The grid has a combined number of 12 columns and the layout has a 2 column setting (4 and 8 = 12).
Then I have my rows which have their own respected sizes for the sidenav macro and other stuff like content, images, etc...
Your code suggests your nesting div (within GetGridHtml which by default is bootstrap3.cshtml) with a class of container within another div with class of container. As the container class defines a width of 1170px for large widths in bootstrap 3 there lies your issue. One way around this would be to create a customer grid partial within the grid folder then use it by @CurrentPage.GetGridHtml("bodyText", customgridpartial). Try copy and pasting the bootstrap3.cshtml and then remove the container div to start then by changing the grid settings you should be able to get it to work.
The page is now showing it much better, but there are still some issues in it.
Main concern now is that the sidenavigation is listed ontop of my content instead of besides it.
Grid sidenavigation
So I have another question. In my classical layout I have a sidebar navigation on each page. Is it possible to do this in the grid as well?
So I'll have the option to add the navigation in the sidebar like a macro?
This is how it is now, but if you browse the page, you have long bit added whitespace due to the grid set up (it's set to 8 and the side nav to 4). http://www.don-zalmrol.be/blah-blah/
Thanks!
Laurens
Hi,
make your menu in
partial view
and add inmacro.
and used this macro in grid layout.
Hope this is helpful
Regards,
Mehul Gajjar.
Thx, that's made it work. But for some reason now, my grid is showing outside my website.
The grid has a combined number of 12 columns and the layout has a 2 column setting (4 and 8 = 12). Then I have my rows which have their own respected sizes for the sidenav macro and other stuff like content, images, etc...
http://www.don-zalmrol.be/blah/
Hi,
As in your grid layout 4 rows created Full , Half , Photo+Content and macro.
kindly click on macro row and increase the number of cell same as full row.
Regards,
Mehul Gajjar
Hi Mehul,
I've did it just now. But the page got wider instead of smaller :) All my rows are now set to 12 columns in total.
Seems it's something to do with the row size.
This is my template code, which is as you can see just basic stuff.
@{ Layout = "Master.cshtml"; }
Hi Laurens,
Your code suggests your nesting div (within GetGridHtml which by default is bootstrap3.cshtml) with a class of container within another div with class of container. As the container class defines a width of 1170px for large widths in bootstrap 3 there lies your issue. One way around this would be to create a customer grid partial within the grid folder then use it by @CurrentPage.GetGridHtml("bodyText", customgridpartial). Try copy and pasting the bootstrap3.cshtml and then remove the container div to start then by changing the grid settings you should be able to get it to work.
Good luck!
JC
Hi Laurens
You might consider removing the container and row elements from your master.cshtml
The Grid layout renderer will create the necessary .container and .row elements to wrap your content correctly.
/Rune
Hi Rune, I've removed it, the styling is now a little bit different. But still showing out of the page.
I'll take a look at J.C's suggestion about the own styling layout.
J.C what do I need to do exactly?
Do I need to:
Ok, so I've changed the grid setttings in the bootstrap file. I've just created a new one and changed the div's to the ones I use.
http://www.don-zalmrol.be/blah/
The page is now showing it much better, but there are still some issues in it. Main concern now is that the sidenavigation is listed ontop of my content instead of besides it.
Bootstrap code:
@using Umbraco.Web.Templates @using Newtonsoft.Json.Linq
@* Razor helpers located at the bottom of this file *@
@if (Model != null && Model.sections != null) { var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
}
@helper renderRow(dynamic row, bool singleColumn) {
@functions { public static MvcHtmlString RenderElementAttributes(dynamic contentItem) { var attrs = new List
}
Little update, I'm getting there.
The layout is starting to look like a "regular" page. But now I need to lower the content a bit so it isn't stuck at the top nav bar.
http://www.don-zalmrol.be/blah/
Ok, fixed :)
Seemed that I needed to put the
Thank you all for your help!
Hi Laurens, been busy the last couple of days glad you got it sorted!
is working on a reply...