I am using Sitecore Experience Accelerator 1.4 and I do not want to use bootstrap,foundation or Grid960 I have my custom css framework, Any one can provide me solution that how I can add new Grid?

  • According to this page you can create your own grid: doc.sitecore.net/sitecore_experience_accelerator/… 'SXA supports integrating other grid frameworks and you can also build your own.' I'm not exactly sure how you go about doing this though as can't find any docs on it. However it looks like you might need to add to the base themes here: /sitecore/Media Library/Base Themes. – Adam Seabridge Jul 5 '17 at 10:05
up vote 6 down vote accepted

It is easy. See how bootstrap is configured

Create Grid Theme

Example:

/sitecore/media library/Feature/Experience Accelerator/Bootstrap/Bootstrap

Why/What?

It is your custom grid theme. The most important thing is to include your css file with all your grid classes

Create Grid Definition

Example:

/sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap/Grid Definition

Why/What?

This item contains children which defines your devices (Phone, Desktop). Each device can have different properties (Size, Push, Pull, Offset) and each property can have different values (css classes, for example col-xs-1 for Phone Device->Size->1, you will use your grid classes here)

Fields:

  • RenderingParametersFieldType - I assume you are not doing anything custom here, so you can use default field renderer: Sitecore.XA.Foundation.Grid.Fields.FieldRenderers.GridRenderingParametersFieldRenderer, Sitecore.XA.Foundation.Grid. Once you fill this field and save an item you should see DefaultGridParameters rendering your configuration.
  • DefaultGridParameters - provide default values here
  • Grid Theme - link to your grid theme defined in step 1
  • GridFieldParserType - link in first point, use default: Sitecore.XA.Foundation.Grid.Parser.GridFieldParser,Sitecore.XA.Foundation.Grid if you are not going to customize anything.
    • GridBodyViewPath - path to your cshtml file which contains your grid layout. Remember to include all necessary placeholders (header, main, footer)

Create Scaffolding Setup

Example:

/sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap/Grid Setup

Why/What?

This item contains only link to a Grid Definition and Name that will appear in a new Site Dialog in the tab with grid selection

  • I think the thing I hate the most about SXA is how everyone writing about it keep saying "It is easy". It's easy when you are use to it, just like it's easy for me to perform Sub-Zero MkII Fatality, but for someone who start with SXA, it's everything but easy. – Simon Arnold Mar 28 at 19:36
  • I would agree with @SimonArnold – Sitecore Sam Jul 4 at 11:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.