Pages, Articles & News
Tools & Plugins
Example / Placeholder Title


Description as an example placeholder. Sample text content for further customization of the "Index36" template.

You are free to edit and customize the template however you like. If you don’t have time or enough knowledge — you can always order template adaptation by contacting me via GitHub or private messages on the digital goods marketplace.

Menu by Parent Category with Structured Articles

A plugin for creating and organizing the structure of online documentation, user guides, knowledge bases, and any informational or software product, goods, or application.

0 Published Filed under: Cotonti Siena CMF Author Plugins for Cotonti

Menu by Parent Category for CMF Cotonti Siena v.0.9.26, PHP v.8.4+, MySQL v.8.0

This plugin allows you to create menu item lists in your online documentation section, knowledge base, or for any informational/software product you are developing, maintaining, or selling.

It works with the selected parent category and all its child categories, including the articles published in them. Menu by Parent Category for CMF Cotonti Siena version 0.9.26, PHP 8.4+, MySQL 8.0

Menu by Parent Category (cot-menubyparentcat)

Plugin for CMF Cotonti Siena 0.9.26+
Version: 2.2.8
License: BSD
Author:webitproff

GitHub: https://github.com/webitproff/cot-menubyparentcat


Purpose and solved tasks (in detail)

cot-menubyparentcat — a plugin for manually building menus based on a selected parent category of the Page module.

The cot-menubyparentcat plugin was created with one specific goal — to give theme developers, module and plugin authors, as well as site owners on Cotonti Siena a full-featured, convenient, and beautiful tool for creating online documentation, user guides, knowledge bases, or internal wikis for their products.

This is exactly the case when the standard auto-generated Cotonti menus (by category structure or by tags) are not suitable:

  • they do not allow control over the order of items
  • you cannot hide drafts or technical pages
  • it is impossible to rename sections to short and clear names in the menu
  • there is no way to move important pages (“Introduction”, “Installation”, “FAQ”) to the top of the list

cot-menubyparentcat solves all these problems at once.

Main use cases (real examples):

  1. Documentation for a theme
    Example: you released a premium theme for Cotonti.
    You need a “Documentation” section with a clear structure:
    Introduction → Installation → Configuration → Components → FAQ → Updates
    With this plugin you create a root category theme-docs, add the necessary sections and pages in the required order — and get a perfect menu like https://adminlte.io/themes/v4/docs/
  2. User guide for a plugin or module
    You developed a complex plugin (e.g., shop, freelance marketplace, CRM).
    Customers need detailed instructions.
    cot-menubyparentcat allows you to create a menu like:
    Overview → Registration → Creating a project → Payment → Disputes → API
    While hiding pages that are still in development.
  3. Knowledge base for a service / SaaS product
    You have an online service built on Cotonti.
    You need a separate “Help” menu with sections:
    Tasks → Services → Wallet → Security → Rules
    Each section has dozens of articles, but in the menu you show only the main ones and hide the rest until they are ready.
  4. Technical documentation for a framework/library
    You ported Bootstrap, Tailwind, or another UI kit to Cotonti.
    You create documentation similar to the official one:
    https://getbootstrap.com/docs/5.3/getting-started/introduction/
    The plugin allows you to exactly replicate such structure and menu appearance.

What the plugin specifically provides for documentation:

FeatureWhy it’s critical for documentation
Manual item orderingSections follow the exact learning logic: from simple to complex
Hiding pages without deletionYou can write drafts without showing them to users
Overriding titlesLong page title → short and clear title in the menu
Separators (category titles)Clear visual separation of large content blocks
Direct links outside categoriesImportant pages “Introduction”, “Quick start” always at the top
Auto-highlighting of the active itemUser always knows where they are
Accordion with article countModern UX like in official documentations

Real example of a documentation menu structure:

User Guide
├── Introduction
├── Quick Start
├── Registration and Profile
├── Tasks and Projects
│ ├── Creating a Task
│ ├── Choosing a Contractor
│ ├── Execution Stages
│ └── Disputes and Arbitration
├── Services
│ ├── Creating a Service
│ ├── Packages and Add-ons
│ └── Reviews
├── Payments and Wallet
│ ├── Top-up
│ ├── Withdrawal
│ └── Transaction History
├── Security
└── Frequently Asked Questions

All items above are either category separators or manually added pages.
Order, visibility, and titles are fully under your control.

Therefore, the key purpose is:

This is a specialized tool for creating professional online documentation for software or any other product. Using Cotonti + menubyparentcat you can easily create online documentation for your developments or products and organize the documentation menu so that the user can quickly and easily find the needed instruction.

menubyparentcat is not just “yet another menu”. For example, my other plugin Tree Cats Page Plugin for Cotonti Siena 0.9.26menubyparentcat is its evolution and has already become an essential component of any informational product. Without well-organized documentation and author support for users of your development(*), for example using the “forums” module on Cotonti CMF, it will be difficult for people to get acquainted with and master your product, whether it is paid or free. * — (plugin, module, theme, script, program, etc.)


Here are several examples of what can be achieved in terms of organizing your own online documentation:


The menubyparentcat plugin allows you to:

  • manually control the menu structure
  • sort categories and pages in any order
  • hide individual items without deleting them
  • override titles
  • add pages outside the category structure
  • use categories as header separators

Perfect for creating:

  • help sections
  • user guides
  • complex FAQs
  • menu groups with manually created structure

Compatibility and requirements

  • Cotonti: Siena 0.9.26+
  • PHP: 8.1+ (8.4 recommended)
  • MySQL: 8.0+
  • Page module: required

The plugin does not conflict with other menus and does not override standard Cotonti functions.


Installation

  1. Download the archive: https://github.com/webitproff/cot-menubyparentcat
  2. Unpack into plugins/
  3. In admin panel go to: Plugins → Installation → menubyparentcat → Install
  4. Immediately after installation:

    Administration → Extensions → Menu by Parent Category → Configuration

    set the code of the parent category to manage its content, for example user-guide


Configuration

In the admin panel you need to specify:

Parent category code (see screenshots)

For example:

  • user-guide
  • help
  • docs

This code is taken from the Pages → Code field in the Page module structure.

After saving, you can start adding menu items.


Admin panel: managing menu items

Each item has the following parameters:

Type

  • Category (cat) — menu section + automatic loading of pages inside it
  • Page (page) — direct link to an article

Fields:

  • Category code / Page ID — list depends on the selected type
  • Sorting order — integer number; the smaller the number, the higher the item appears
  • Overridden title — custom text if needed
  • Include in menu — allows hiding the item

Admin features

  • edit item
  • delete
  • change order using numeric values
  • no duplicates — a page will not appear twice

Displaying the menu on the site

In any site template (for example, sidebar.tpl):

If the category code is set in the plugin settings (recommended):

<!-- IF {PHP|cot_module_active('page')} AND {PHP|cot_plugin_active('menubyparentcat')} -->
{PHP|cot_menubyparentcat_build_tree()}
<!-- ENDIF -->

Second example:

<!-- IF {PHP|cot_module_active('page')} AND {PHP|cot_plugin_active('menubyparentcat')} -->
<div class="sidebar-menu">
 <h5>Help</h5>
 {PHP|cot_menubyparentcat_build_tree('user-guide')}
</div>
<!-- ENDIF -->

Template for rendering the tree of categories and articles

The plugin uses the file:
menubyparentcat.tree.tpl (source code)

The template implements:

  • Bootstrap 5 menu structure
  • collapsible submenus
  • alias (SEO-friendly URLs) support
  • active item highlighting
  • display of categories with subpages
  • display of direct pages

Features and advantages

  • full manual control over menu structure
  • overridable titles
  • support for hidden items
  • direct links to specific articles
  • automatic loading of all pages in a category
  • duplicate protection
  • correct URL formation
  • high performance (indexed queries)

Development and support

If the plugin was useful — please give it a ⭐ on GitHub!


Copyright

© webitproff, 27 Nov 2025, License BSD.


You can hire me or offer a job

write me a private message on this page

No comments yet
Only registered users can post new comments
Account