• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Overriding Admin tpl's From A Plugin?

Scheduled Pinned Locked Moved NodeBB Plugins
5 Posts 4 Posters 2.1k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jongarrisonJ Offline
    jongarrisonJ Offline
    jongarrison Plugin & Theme Dev
    wrote on last edited by
    #1

    Is this possible? I've hunted around and haven't found anyone talking about a way of overriding admin tpl's. I'd like to hide some of the admin options from certain types of admins (based on user group membership).

    Any thoughts on this?

    jareyJ 1 Reply Last reply
    0
  • jareyJ Offline
    jareyJ Offline
    jarey Translator
    replied to jongarrison on last edited by jarey
    #2

    @jongarrison don't know if it can be compared, but at least the scripts client side are overriden if you define the same 'define'. Could be the same behaviour if you declare a tpl with same name and path on your plugin? Or maybe declare it for the same route?

    Haven't tried it yet, but i'm curious.

    Maybe it's just something silly...

    yariplusY 1 Reply Last reply
    2
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    replied to jarey on last edited by
    #3

    @jarey yes, that should work. If you define a template with the same path and name, it will override an existing one. e.g.admin/manage/users.tpl

    1 Reply Last reply
    2
  • jongarrisonJ Offline
    jongarrisonJ Offline
    jongarrison Plugin & Theme Dev
    wrote on last edited by
    #4

    I tried this today and I was able to override an admin template. I'm not sure what I did incorrectly when I tried earlier. Thanks for confirming that this could be done!

    1 Reply Last reply
    2
  • D Offline
    D Offline
    diannarita
    wrote on last edited by
    #5

    any chance to share the repository? thanks in advance 😃

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development