C
C
cirega2015-12-23 13:22:39
1C-Bitrix
cirega, 2015-12-23 13:22:39

Is there a page load event for the public part only?

Good afternoon, I am writing a module for compiling less using php. There was a small problem, in my module I connect the event handler

public function doInstall()
    { 
        RegisterModuleDependences("main", "OnEpilog", $this->MODULE_ID, "BitBenLess", "compilation");
        ModuleManager::registerModule($this->MODULE_ID);
    }

the problem is that this event is also called in the admin panel, is there any way to execute this or another event only in the public part?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2015-12-23
@cirega

There is no separate event, but there is a constant ADMIN_SECTION , the value of which you can check.

O
Oleg Maksimenko, 2015-12-24
@olegprof

Why do you write (if not a secret) when there are ready-made ones? For example https://marketplace.1c-bitrix.ru/solutions/olegpro... (by the way, expandable by any compilers)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question