template hooks not omnipresent then?

User

Well-known member
I am looking at templates.xml and I see
HTML:
<template title="forum_mark_read" version_id="1000015" version_string="1.0.0 Alpha 5">
at line 5,746.

It appears that the forum_mark_read template isn't part of a hook.

My question is whether this is by design or whether it is an oversight? Should all aspects of a template be accessible via a hook? Am I confused about hooks?
 
Template hooks were strategically placed within the templates themselves. You'll want to find <xen:hook>'s within the template.
 
That's what I mean though, there's no hook within that template nor is that template part of a hook. I don't want to post the code into the message so I just attached it.

Overly simplified, there is no:
Code:
<template>
    <xen:hook />
</template>
neither is there a:
Code:
<xen:hook>
    <template>
    </template>
</xen:hook>
for the forum_mark_read template.
 

Attachments

That's what I mean though, there's no hook within that template nor is that template part of a hook. I don't want to post the code into the message so I just attached it.

Overly simplified, there is no:
Code:
<template>
    <xen:hook />
</template>
neither is there a:
Code:
<xen:hook>
    <template>
    </template>
</xen:hook>
for the forum_mark_read template.
Not every template has a hook, only ones that have a real use for them (sidebar, navigation etc).
 
Not every template has a hook, only ones that have a real use for them (sidebar, navigation etc).
Alright, that does answer my question. As for real use, well ..., different people different needs. ;)
I would imagine that apart from the initial tedium of getting it done there is really no downside to include a hook for every template.
 
Alright, that does answer my question. As for real use, well ..., different people different needs. ;)
I would imagine that apart from the initial tedium of getting it done there is really no downside to include a hook for every template.
Real use -> widely used.

Most developers aren't going to make something to modify the mark read template, whereas they're likely to modify sidebar/navigation with most add-ons.
 
Most developers aren't going to make something to modify the mark read template, whereas they're likely to modify sidebar/navigation with most add-ons.
Yeah I can agree to that, ideally there would be an admincp option to disable the confirmations. Actually as ajnos pointed out in the hook request thread, a hook into that template won't actually yield the desired result.
 
Top Bottom