Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Creating a wiki knowledge base page

  • Apologies if this topic is in the support forum, as I searched for multiple wiki keywords, but I got no results.

    I want to create a knowledge wiki page with 3 grids. The left grid has a collapsible list where if a topic is clicked, the information would open up in the center grid, and the right grid would be the shortcut to the topic within the article. A similar site that I have found is from the Mozilla Developer page:

    https://developer.mozilla.org/en-US/docs/Web/HTML

    Would this be possible to do directly with GenerateBlocks, or do I need to install a wiki plugin? I was thinking of using the accordion block on the left grid or using buttons, but I was wondering how I would be able to connect to the information content for the middle grid and, subsequently, the third grid.

    Thank you.

  • Hi there,

    how many pages will this “wiki” have ? And will be you adding more content to it over time, as that would determine whether you could build it statically with blocks or whether a dynamic solution is required.

    The way i see this is:

    Left Sidebar -> Page Navigation with sub pages
    Content
    Right Sidebar -> Table of Content Plugin

    Let me know

  • Hi David. The information is regarding the availability of open-source software; right now 11 categories, and each category will probably have up to 10 software listings.

  • OK, so the left sidebar would be a list of post Category Terms, and nested within a list of the posts right ?

  • That sounds about right, David.

  • OK, so it would require custom development, so there is a limit on what i can provide.
    But i do have a PHP Snippet to create the navigation.

    1. Add the PHP Snippet provided in this GIST to your site:

    https://gist.github.com/diggeddy/58745c3f764cd58716a1c0e153e6626c

    This will create a shortcode: [category_posts]

    2. Then in your Customizer > Widgets > Left Sidebar add:

    i) a shortcode block and add your [category_posts] to it.

    This will display a list of All Categories in a HTML Detail element that can be toggled open. Within is the related posts. And the current post has a current-post class which we can use to keep the detail open and to style the current link.

    ii) after the shortcode add a HTML Block and add this script:

    <script>
    window.addEventListener('DOMContentLoaded', function() {
      var listItems = document.querySelectorAll('.current-post');
    
      listItems.forEach(function(listItem) {
        var detailElement = listItem.closest('details');
        if (detailElement) {
          detailElement.open = true; // Open the detail element
        }
      });
    });
    </script>

    This JS will open the relevant detail tab when you click on a post link.

    That should do for your left sidebar

    Let me know.

    The Right Sidebar use the Easy ToC plugin ( or alternative ) to display a table of contents for your post.

  • Wow. Ok thanks so much, David. I will give this a go and let you know. Really appreciate your help.

  • You’re welcome

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.