Developer forum

Forum » Templates » Setting up sections in a Visual Editor page

Setting up sections in a Visual Editor page

Jaap Tinholt
Reply

I'm setting up a new Visual Editor template
In the template using the old fashion way, there were two sections. for example 'Inital content' or 'Extra content'
In between there will be dynamicly generated content.
Now in the VE template I noticed that when I use these

@Model.Grid("grid", "Initial content", "", "Pages")
@Model.Grid("gridextra", "Extra content", "", "Pages")

It will create extra sections in the CMS. But I'm not able to do anything with it.
The Visual Editor doesn't seem to like it either.

Is there another way? Am I doing something wrong?
Because this is a feature we really need. It would be a step back from before...

Thanks a lot!


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Jaap,

The Visual Editor doesn't currently support multiple grids defined on the same page.

Originally, the intention was for it to be possible to have as many grids as you wanted on the page. It was changed during development due to some technical concerns. We may be able to enable this feature now, so I've added a feature request for that (#82624) and we'll see what we can do about it. We'll also keep you updated here.

There is a workaround that you can try to use in the meantime, though it may not suit your use-case. You can specify grids on different pages and reuse those on your page. This is useful for fixed content like headers and footers. The way you do it is to create a page with your extra grid content. In the template for your main page, you can have that content rendered by using "@RenderGrid(<pageid>)", where the page id points to the page with the extra content.

If external grids don't work for you, then there is another way you can work around the issue, however it requires more work and it's NOT editor-friendly. As you've probably noticed, you can edit the first grid only, so if you really wanted to, you could build out the different grids in turn by swapping their order in the template. Note, please, that I'm not recommending this course of action. I only mention it for completeness sake.

- Jeppe

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Jaap,

We have implemented a feature that enables you to edit multiple grids on the same page as long as they're using the same Grid Definition (Pages in your case).

It's currently in review but I expect it will be released with Dynamicweb 9.9 later this month.

- Jeppe

 

You must be logged in to post in the forum