Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    934
    Plugin Contributions
    9

    Default Adding new link to Admin Navbar

    Is there a guide on how to add custom links to the navbar in the admin area?



    In this portion here, I tried to modify the header_navigation.php file but my change doesn't seem to come through?

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,833
    Plugin Contributions
    31

    Default Re: Adding new link to Admin Navbar

    Use
    $zco_notifier->notify('NOTIFY_ADMIN_HEADER_UPPERMENU', $upperMenuArray, $upperMenuOverrideArray);

    If you are not familiar with notifer-observers, get familiar. You won't look back.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  3. #3
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    934
    Plugin Contributions
    9

    Default Re: Adding new link to Admin Navbar

    Quote Originally Posted by torvista View Post
    Use
    $zco_notifier->notify('NOTIFY_ADMIN_HEADER_UPPERMENU', $upperMenuArray, $upperMenuOverrideArray);

    If you are not familiar with notifer-observers, get familiar. You won't look back.
    Any particular event should I attach it to?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,929
    Plugin Contributions
    96

    Default Re: Adding new link to Admin Navbar

    Quote Originally Posted by retched View Post
    Any particular event should I attach it to?
    Er, NOTIFY_ADMIN_HEADER_UPPERMENU, which is issued by admin/includes/header.php

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,833
    Plugin Contributions
    31

    Default Re: Adding new link to Admin Navbar

    Here is an example of use:

    https://gist.github.com/torvista/1e6...d438a5ae3d0e49

    which I use to make the "Storefront" link go to the product or category that is currently being viewed in the admin.

    Caveat Emptor
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,527
    Plugin Contributions
    127

    Default Re: Adding new link to Admin Navbar

    Bear in mind that this is a new unreleased notifier, so you'll have to pull in admin/includes/header.php from Github.

    A nice improvement coming to a Zen Cart release soon!
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,833
    Plugin Contributions
    31

    Default Re: Adding new link to Admin Navbar

    >this is a new unreleased notifier

    Oops sorry, I forget I'm on the bleeding edge.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,527
    Plugin Contributions
    127

    Default Re: Adding new link to Admin Navbar

    Thank you for helping us test the bleeding edge! This makes it more likely that when we do release, it will be of better quality.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  9. #9
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    934
    Plugin Contributions
    9

    Default Re: Adding new link to Admin Navbar

    Quote Originally Posted by swguy View Post
    Bear in mind that this is a new unreleased notifier, so you'll have to pull in admin/includes/header.php from Github.

    A nice improvement coming to a Zen Cart release soon!
    Oh, okay, so I wasn't crazy. I ended up pulling it from the main branch when I didn't see it in the notifier report in the documentation. Managed to get this to work relatively easily with the observer.

 

 

Similar Threads

  1. Is there a way of adding a product but stopping it from adding to new products?
    By philpalmerdevon in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 19 Jan 2009, 02:07 PM
  2. When adding new parts, adding part number to preview screen
    By GTHENRY in forum Basic Configuration
    Replies: 1
    Last Post: 18 Jun 2008, 07:53 PM
  3. Adding a link to right hand box and adding pages....Please help
    By Ivum in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 Mar 2007, 11:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg