Page 1 of 1

Modifying a custom ACP template module.

Posted: 15. December 2025 15:03
by cabot
Hello,

I have created a module that allows me to display blocks of links retrieved from an extension.
The permissions for displaying these blocks are configured upstream by the extension.

I would like to disable the ‘Module permissions’ block.
Image

Alternatively, if this is not possible, display a message to warn the administrator that the permissions are already set by the extension and that it is recommended not to change anything in this block.

The current code is very basic.

Code: Select all

	public function get_template_side($module_id)
	{
		if (is_object($this->controller_helpers) && method_exists($this->controller_helpers, 'build_sidebar'))
		{
			$this->controller_helpers->build_sidebar();
		}

		return '@gtroph_b3pgtrophlinks/gtroph_links_side.html';
	}

	public function get_template_acp($module_id)
	{
		return [
			'title' => 'B3P_GTROPH_LINKS',
			'vars' => [],
		];
	}
}

Re: Modifying a custom ACP template module.

Posted: 15. December 2025 19:57
by Kirk
Hi
This is not possible as it is displayed in every block. You could add something to the PHP file of your block.
within:

Code: Select all

	public function get_template_acp($module_id)

Re: Modifying a custom ACP template module.

Posted: 16. December 2025 10:45
by cabot
So return a message using “legend1” or something like that?

Re: Modifying a custom ACP template module.

Posted: 16. December 2025 18:10
by Kirk
Exactly, it looks like this:
no_change_module_permissions.jpg
no_change_module_permissions.jpg (8.95 KiB) Viewed 98 times

Re: Modifying a custom ACP template module.

Posted: 16. December 2025 18:18
by cabot
Thx!