Advertisement:

Author Topic: How SMF sets the order to functions inside the template?  (Read 671 times)

Offline ivimendoza

  • Newbie
  • *
  • Posts: 4
How SMF sets the order to functions inside the template?
« on: June 11, 2014, 03:38:50 PM »
Hello,

When I see all the functions inside a file.template.php, I can't really understand how SMF executes it. I guess, this is kinda interpreted by the loadSubtemplates(), but I don't know how it sets the order of execution. For example, in ManageBans.template.php I see this functions: template_ban_edit(), template_ban_edit_trigger(). This functions actually defines all the HTML structure, but I don't understand how it makes the order each other. Can somebody explain me, please? Thanks.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: How SMF sets the order to functions inside the template?
« Reply #1 on: June 11, 2014, 03:40:17 PM »
The code in ManageBans, in each area, sets the value of $context['sub_template'] to the one that fits the current task at hand...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.