Amphtml: Add multiple side of amp-sidebar

Created on 23 May 2016  Â·  5Comments  Â·  Source: ampproject/amphtml

HI guys!
So we can set open side of amp-sidebar by body tag’s dir attribute (ltr => left , rtl => right’).
But if I have two amp-sidebar and I need use first menu open from left side
and last menu open from right side?
Can we implement a rule for open sidebar left / right by tag side=right / side=right inside amp-sidebar tag?
For example:

<amp-sidebar id='sidebar1' layout='nodisplay' side='left'>
  <ul>
    <li> Bla - bla 1</li>
    <li> Bla - bla 2</li>
  </ul>
</amp-sidebar>
<amp-sidebar id='sidebar2' layout='nodisplay' side='right'>
  <ul>
    <li> Bla - bla 1</li>
    <li> Bla - bla 2</li>
  </ul>
</amp-sidebar>

Thanks!

Feature Request

Most helpful comment

Just stumbled upon this, a user case from an e-commerce perspective is to show the main navigation menu in the left side bar and a filter experience in the right side bar.

All 5 comments

/to @sriramkrish85
/cc @rudygalfi @ericlindley-g

@slivorezka just curious - what is the use-case for this ?
Although 2 sidebars are not recommended it is possible to do what you described.
Given that you should also note that we do have a UX bug (https://github.com/ampproject/amphtml/issues/3320) that will be fixed. And make your plans accordingly.

You are also welcome to help fix this bug :)

Just stumbled upon this, a user case from an e-commerce perspective is to show the main navigation menu in the left side bar and a filter experience in the right side bar.

@heiwen Great feedback. I've observed that as well.

Was this page helpful?
0 / 5 - 0 ratings