I mean for Filter by Country to do something like subscribe to the
core.page_headerevent, and then do nothing more than set a template variable containing the country code that Filter by Country had determined "represents the country this connection is from." For example, in the
core.page_headerevent handler function the code might look something like:
Code: Select all
$this->template->assign_vars(array( 'FILTER_BY_COUNTRY_ISO' => $country_code, ));
$this->templatevariable used in this example.
The point being that it's not you who will generate any HTML or decide how this information gets used. You're making the
FILTER_BY_COUNTRY_ISOvariable available for any templates to reference, if and when they are interested in using this information.
Whether the templates use it at all, or what they might use it for, and/or whether and how it might get displayed is entirely up to the template that decides to consume it. And of course, this variable doesn't exist at all (and templates simply get a blank value) on any system where Filter by Country isn't even installed.
i.e. Just a way to "share" the determined country information with the templates, in case they can make use of it.