Skip to main content

Menu entries

Preparation

The things to consider and to have to hand before starting

Administrative menu entries

Start with the menu entries. Example is Accounting module

          # Ledgers
            [[admenu.topleft.content.submenu]]

                label = '9999:Ledgers'
                title = '9999:Ledgers to which all transactions belong'
                icon = 'landmark'
                id = 'ledgers'
                event = 'actionbutton'
                action = 'fetchadminsubpage'
                table = 'dbledger'
                displaytype = 'datatable'
                url = 'getdatatable'
                acl = 70
                submenu = false
                parent = 'content'

            # Transactions
            [[admenu.topleft.content.submenu]]

                label = '9999:Transactions'
                title = '9999:Generates a cash book for a bank account with analysis'
                icon = 'cash-register'
                id = 'transactions'
                event = 'actionbutton'
                action = 'fetchadminsubpage'
                table = 'dbtransaction'
                displaytype = 'cashbook'
                url = 'getcashbook'
                acl = 70
                submenu = false
                parent = 'content'

            # Journals
            [[admenu.topleft.content.submenu]]

                label = '9999:Journals'
                title = '9999:Generates two sided transactions that must balance'
                icon = 'coins'
                id = 'journals'
                event = 'actionbutton'
                action = 'fetchadminsubpage'
                table = 'dbtransaction'
                displaytype = 'datajournal'
                url = 'getdatajournal'
                acl = 70
                submenu = false
                parent = 'content'

Things to note:

We will convert 9999's to real entries in Strings and Translations in due course.

Unique ID for each menu entry is advisable. Icons from Fontawesome. Just significant part of free icon name (no need for fa-). Can the data display and entry be satisfactorily handled by existing admin facility or do wee need to write special routine. If the latter, should this be in ApiExtended or as a Plugin? 

Programming the module