Consul: Navigation sidebar on custom pages

Created on 6 Nov 2018  路  4Comments  路  Source: consul/consul

Background

Now admin users can create custom pages /admin/site_customization/pages and some of this pages have a lot of content.

What we need

Include a new checkbox option to show headings as sidebar navigation of the content to users.

For example, if the page has the following content:

<h3>Title of this section</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.</p>

<h4>Another heading</h4>
<p>Duis aute irure dolor in reprehenderit in.</p>

<h3>A new section</h3>
<p>Voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>

The sidebar should show somethig like:

<ul>
  <li>
    <a href="#h3_1">Title of this section</a>
    <ul>
      <li><a href="#h4_1">Another heading</a></li>
    </ul>
  </li>
  <li>
    <a href="#h3_2">A new section</a>
  </li>
</ul>

Notes

Also wrap title and subtitle page content with <div class="jumbo"> to add styles to header.

Screenshots

admin

users

Admin

Most helpful comment

Hi dear @decabeza,
I'm sorry it took too long I will submit a pull request in a few days, I'm sorry for the delay :)

All 4 comments

Hey there, I am willing to do this dear @decabeza 馃憤 :)

Perfect @behraaang! 馃槈

Hi @behraaang! How are you? any news with this issue?

Tell us if you need some help. Many thanks! 馃檹 馃槍

Hi dear @decabeza,
I'm sorry it took too long I will submit a pull request in a few days, I'm sorry for the delay :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bertocq picture bertocq  路  7Comments

decabeza picture decabeza  路  5Comments

vinxenxo picture vinxenxo  路  4Comments

voodoorai2000 picture voodoorai2000  路  7Comments

voodoorai2000 picture voodoorai2000  路  6Comments