# Overriding theme sections, what's the best practice?

**URL:** <https://forum.virtualmin.com/t/overriding-theme-sections-whats-the-best-practice/61649>\
**Category:** Developers\
**Created:** [December 2, 2019, 1:18pm UTC](https://forum.virtualmin.com/t/overriding-theme-sections-whats-the-best-practice/61649 "2019-12-02T13:18:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dowell22](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@dowell22](https://forum.virtualmin.com/u/dowell22)\
**Post date:** [December 2, 2019, 1:18pm UTC](https://forum.virtualmin.com/t/overriding-theme-sections-whats-the-best-practice/61649/1 "2019-12-02T13:18:12Z")

</div>

I’m trying to change what’s displayed on virtualmin’s sidebar section and found this on the code (view\_domain.cgi):

`
# Show actions for this domain, unless the theme vetos it (cause they are on
# the left menu)
if (!$main::basic_virtualmin_domain) {
	&show_domain_buttons($d);
	}
`

Is there a non-hacky way to do it? It seems authentic-theme can add Perl syntax on scripts.pm, but I’m not seeing any hook-type style of functions to override UI methods. Any suggestions?

---

<div class="post-metadata">

**Author:** ![dowell22](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@dowell22](https://forum.virtualmin.com/u/dowell22)\
**Post date:** [December 2, 2019, 1:20pm UTC](https://forum.virtualmin.com/t/overriding-theme-sections-whats-the-best-practice/61649/2 "2019-12-02T13:20:00Z")

</div>

Oooh. So “basic\_virtualmin\_domain” is the hook. Trying this one out. Nope. misunderstood this.

---

<div class="post-metadata">

**Author:** ![dowell22](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@dowell22](https://forum.virtualmin.com/u/dowell22)\
**Post date:** [December 3, 2019, 10:22am UTC](https://forum.virtualmin.com/t/overriding-theme-sections-whats-the-best-practice/61649/3 "2019-12-03T10:22:15Z")

</div>

If anyone is wondering, what you’ll be looking for is webmin\_menu.pl in virtual-servers. I made an addon permissions module (just a simple file) to go through the links, and also disallow access when the page is visited (attaching to virtual-server-lib-funcs.pl). So, yeah, no hooks that I found.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 30, 2020, 6:18am UTC](https://forum.virtualmin.com/t/overriding-theme-sections-whats-the-best-practice/61649/4 "2020-04-30T06:18:25Z")

</div>

Closed on April 30, 2020, 6:18am UTC


