Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Possibility to control rows in Grid Engine

Possibility to control rows in Grid Engine

Mikkel Belchuke
Mikkel Belchuke
Reply

We are missing the possibility to control (add container classes etc.) on rows. if, for example, we would like to add two full with rows and then one contained (a banner) it does not seem to be possible. 

Is this something you could add to the backlog?


Replies

 
Nicolai Pedersen
Reply

Hi Mikkel

Could you post some markup of what you are trying to achieve?

BR Nicolai

 
Mikkel Belchuke
Mikkel Belchuke
Reply

Hi Nicolai. 

What we're trying to achieve is as follows:

<div class="container">
   <div class="row">
      <div class="col-sm-12"></div>
​      <div class="col-sm-12"></div>
   </div>
</div>
<div class="container-fluid">
   <div class="row">
      <div class="col-sm-8"></div>
​      <div class="col-sm-8"></div>
​      <div class="col-sm-8"></div>
   </div>
​</div>

Our designs are a mix of full width and contained content on every page. 

 
Nicolai Pedersen
Reply

Hi Mikkel

Yes, I understand now. No, currently you cannot do that using the grid-mode:auto. We have an item to make containers and rows support item types so they can have settings for stuff like this, background images and colors etc.

You also have this option: grid:true;grid-settings:file.json;grid-mode:InlineTemplate which will tell Dynamicweb to not insert the markup it self. Then in your templates you can take a look at the paragraphViewModel.Grid and paragraphViewModel.SwitchRowAfterCurrentParagraph etc. properties to insert the markup when needed. See https://doc.dynamicweb.com/api/html/865d15b0-9823-0d92-eaf4-439339cee215.htm

And then hook into the rendering and insert the additional container information.

BR Nicolai

 
Mikkel Belchuke
Mikkel Belchuke
Reply

Hi Nicolai.

Thank you for your feedback. I'll take a look at your suggestion.

 
Mikkel Belchuke
Mikkel Belchuke
Reply

Hi Nicolai.

We've tested and are, sadly, not able to get the container/container-fluid div to work. 

Is it possible for you guys to add an extra TemplateTag to check if the current paragraph is the first in the row, and not if the next paragraph is the first.

 
Nicolai Pedersen
Reply

Hi Mikkel

Yes - can see that. I've added a new property on the viewmodel "IsNewGridRow" that you can use. TFS#39226 out with 9.3.2

BR Nicolai

 
Mikkel Belchuke
Mikkel Belchuke
Reply

Hi Nicolai.

Thank you very much. 

We'll look forward to try out that version!

 

You must be logged in to post in the forum