Package title


  • Developer Netgate

    If a package you maintain uses the <title>tag, you may now make a better looking title by inserting some '/' characters, allowing the title to be exploded into a breadcrumb display.<br /><br />So <br /><br /><title>Services/Keurig</title>

    will result in $pgtitle = array("Services", "Keurig") which will in turn generate the breadcrumb display:

    Services / Keurig

    Perhaps not the most obvious way to do it perhaps, but it is at least compatible with existing internal and external packages.


  • Moderator

    Thanks Steve,

    Is it possible to remove the word "Package" from the Title array for XML (pkg_edit.php)
    Package / pfBlockerNG / General

    Other PHP based pages are ok:
    pfBlockerNG / Update

    I also notice when using XML (pkg.php) that the breadcrumb doesn't display at all…

    Note: The breadcrumb will also add the **<tab></tab>**that is marked with <active></active>(See 'General' added to the breadcrumb above), so Its probably best to have the package <title></strong> field the same for every XML file for a particular package.<br /><strong><br />Update</strong>:<br /><br />Actually, to keep it consistent, "<strong>Package</strong>" should probably reference the Menu that the package is install in… So for pfBlockerNG that should be "<strong>Firewall</strong>". The Cron package should have "<strong>Services / Cron / Settings</strong>" but its currently "<strong>Cron / Settings</strong>"</title>


  • Administrator

    @BBcan177:

    Actually, to keep it consistent, "Package" should probably reference the Menu that the package is install in… So for pfBlockerNG that should be "Firewall". The Cron package should have "Services / Cron / Settings" but its currently "Cron / Settings"

    I am working on the Cron package today (so that I can move on to Suricata), I can take a look at that.


  • Moderator

    @Steve_B:

    <title>Services/Keurig</title>

    will result in $pgtitle = array("Services", "Keurig") which will in turn generate the breadcrumb display:

    Services / Keurig

    Would probably be best to add  gettext()   to the title array?

    For XML Based files, if you remove "Package", then in the <title>field, pkg maintainers can add the appropriate Menu/Package name…  <title>Firewall/pfBlockerNG</title>

    Edit: I see the code that you added an  if/else,  So its ok as is  ;) (apart from the gettext)


Log in to reply