I have this in hfs.events as well as the first I posted, and it works in 260 here? So this should be in tpl?
refer you to
http://www.rejetto.com/wiki/index.php?title=HFS:_TemplateBoth have to work

runEventScript('unauthorized');
getPage('unauthorized', data);
Network events
unauthorized
this user has no permission to access the requested resource.
Sections List
[unauthorized]
HTML for the %content% symbol
in tpl, section [unauthorized] is evaluated so often as the variable %content% appear in the section [error-page]
if data.conn.reply.mode <> HRM_REPLY then
s:=xtpl(tpl2use['error-page'], ['%content%', s]);