How to hook only on some pages?
#1
Hello all,
I need to run a pre_output_page hook only when on index page. How can I do it (if possible at all)?
Is there any $var that stores the current page viewed?
I need this because in this hook,after replacing some tags, I run an heavy query to display an output from db after the forum list, so I don't want to waste that time on pages other than index where the hook output is shown.
Running with debug active I noticed that pre_output_page hooks are ran on every page (thread list/post list), no matter if they are useful for something that page displays or not.
Reply


Messages In This Thread
How to hook only on some pages? - by xirtam - 2015-11-22, 09:42 AM
RE: How to hook only on some pages? - by Leefish - 2015-11-22, 10:14 AM
RE: How to hook only on some pages? - by xirtam - 2015-11-22, 10:57 AM
RE: How to hook only on some pages? - by SvePu - 2015-11-22, 12:46 PM
RE: How to hook only on some pages? - by xirtam - 2015-11-22, 02:00 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)