Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMS Layout Json Grid #1361

Closed
nadar opened this issue Jul 23, 2017 · 1 comment
Closed

CMS Layout Json Grid #1361

nadar opened this issue Jul 23, 2017 · 1 comment
Assignees

Comments

@nadar
Copy link
Contributor

nadar commented Jul 23, 2017

Json file which provides a grid defintion for rows and columns in order to represent those informations inside the admin.

@nadar
Copy link
Contributor Author

nadar commented Aug 19, 2017

Since version RC4 you can also add a json file to configure the cmslayout for the admin view, this is optional and will also work without a json file. It can be very helpfull if you want to let the adminarea know how your layout structured with rows and columns, like a grid system.

In order to provide a json, use the same name es for the layout with the ending json, in our example 2columns.json:

{
	"rows" : [
	    [
	        {"cols": 8, "var": "left", "label": "Main content Left"},
	        {"cols": 4, "var": "right", "label": "Sidebar Right"}
	    ],
	]
}

Now the administration area knows how the placeholder columns are structured, known from the bootstrap 4 grid system. The max amount of cols is 12.

You an also define multiple rows, here an advanced example for a layout with 4 placeholders:

{
	"rows" : [
		[
			{"cols": 12, "var": "stage", "label": "Stage"},
		],
	    [
	        {"cols": 8, "var": "left", "label": "Main content"},
	        {"cols": 4, "var": "right", "label": "Sidebar"}
	    ],
	    [
			{"cols": 12, "var": "footer", "label": "Footer"},
		],
	]
}

@nadar nadar closed this as completed in 1a68cc7 Aug 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant