Hi there

Default layout style is 2 columns 75% for activity stream (left), post, etc.. and 25% for complementary top and bottom. (right)

The issues happens when I want to activate first sidebar, thats not appear after post some block through block layout admin.

If I go to Demonstrate regions there is NOT first sidebar region showed.

Any recommendation?

I want to show 3 columns styles, left with user account menu, center with activity stream and right with complementary top and bottom. In other words, just add a first sidebar to the left of the actual theme socialblue.

I've tried to modify manually all file from templates, etc... and I can´t got the proper way to do that.

Any help will be really appreciated.

Im using last version drupal 8

Thank u.
J.

CommentFileSizeAuthor
#2 3columns.jpg468.17 KBowbook

Comments

owbook created an issue. See original summary.

owbook’s picture

StatusFileSize
new468.17 KB

See attachment file to understand better what I mean please.

Thank you very much.

J.

maikelkoopman’s picture

Hi, I am not sure if I understand what you are trying to do exactly. There was still a bug with the sidebr layout, which is fixed in this pull request. https://github.com/goalgorilla/open_social/pull/498. It should now work accordingly to what is described here: http://styleguide.getopensocial.com/section-templates.html#kssref-templa...

You need to move the stream from "content" to region "sidebar_first" then. The other blocks need to go from "complentray /top/bottom" to sidebar_second".

Can you try it and close the issue if it works for you?

owbook’s picture

Thank you so much for your reply. Please just give me 24 hours and I'll report my feedback.

Thanx for your time.

J.

owbook’s picture

Thank you so much for your reply. Please just give me 24 hours and I'll report my feedback.

Thanx for your time.

J.

owbook’s picture

Dear Maikel ;

"The sidebar first region only shows up if the complementary area's are empty".
This helps me A LOT! Your help it´s really appreciated.

I've empty complementary areas and then I can got the 3 columns layout with no problem..
http://styleguide.getopensocial.com/section-templates.html#kssref-templa...

So, that´s cool... BUT, actually 3 columns are spleat at reason of 33% each one.
Would be great if I could get 25% - 50% - 25% columns.
Do you think that this is possible.

I've tried to edit this file:
Markup: 05-templates/layout/layout-3columns.twig

But nothing looks happens, even deleting this file 3 columns layout is loaded as normally. I guess that happens because im editing the wrong file... right? . Is there another file where 3 columns layout is referenced where I could modify the columns size? Is it possible?

Would be great hearing from you soon.

Thank you!
J.

maikelkoopman’s picture

Sure, you can just overwrite the layout in your subtheme. The best way to do this is:

  • create a new layout library in your subtheme (use the smacss category "theme"
  • extend the socialbase/layout library with the library in your subtheme
  • See the socialbase/layout library for the class names you want to overwrite (you need to change the flex properties)

Another way is to extend the page.html.twig file and rename the classes.
Example:

{% extends "page.html.twig" %}
{% set set content_classes = set content_classes = [
      'row',
      'container',
      page.title and display_page_title ? 'with-title-region',
      page.complementary_top or page.complementary_bottom ? 'layout--with-complementary',
      page.sidebar_first is empty and page.sidebar_second is empty ? 'layout--with-complementary',
      page.complementary_top is empty and page.complementary_bottom is empty and page.sidebar_first and page.sidebar_second ? 'your new class name',
      page.complementary_top is empty and page.complementary_bottom is empty and page.sidebar_second is empty and page.sidebar_first ? 'your new class name',
      page.complementary_top is empty and page.complementary_bottom is empty and page.sidebar_first is empty and page.sidebar_second ? 'your new class name',
    ]
 %}
maikelkoopman’s picture

Component: Code (back-end) » Front-End
Status: Active » Closed (works as designed)
slowflyer’s picture

Line 2 should be:

{% set content_classes = [

instead of:

{% set set content_classes = set content_classes = [

slowflyer’s picture

I needed to added:

{%
set content_attributes = content_attributes.addClass(content_classes)
%}

to get it work.

Here's the complete code of mythme/templates/layout/page.html.twig:

{% extends "@socialbase/layout/page.html.twig" %}

  {%
    set content_classes = [
      'row',
      'container',
      page.title and display_page_title ? 'with-title-region',
      page.complementary_top or page.complementary_bottom ? 'layout--with-complementary',
      (page.complementary_top or page.complementary_bottom) and page.sidebar_first is empty and page.sidebar_second is empty ? 'layout--with-complementary',
      page.complementary_top is empty and page.complementary_bottom is empty and page.sidebar_first and page.sidebar_second ? 'layout--with-three-columns',
      page.complementary_top is empty and page.complementary_bottom is empty and page.sidebar_second is empty and page.sidebar_first ? 'layout--with-two-columns',
      page.complementary_top is empty and page.complementary_bottom is empty and page.sidebar_first is empty and page.sidebar_second ? 'layout--with-two-columns',
      page.complementary_top is empty and page.complementary_bottom is empty and page.sidebar_first is empty and page.sidebar_second  is empty? 'layout--with-one-column',
    ]
  %}
  {%
     set content_attributes = content_attributes.addClass(content_classes)
  %}