What blows your mind about it?
At least add-ons can utilize template modifications, major edits on styles have no choice but to edit the templates directly.
It's not a question of efficiency. As I said, the TMs are applied to the compiled template so that happens once, at compile time. There is zero performance impact.
1 complete rewrite, however, will inevitably break things. If not now, then certainly in the future.
You keep comparing changing major blocks of code (and honestly in many years I don't recall actually seeing any issues arise from this to the point where the issues can't be resolved) to replacing a template entirely.Yes it’s nice. But the problem is that a style can change major blocks of code in the templates, but a addon can’t.
Correct.Still blown away. So I can have 50 addons installed, each with 10 TM added, and that does not affect performance at all?
<xf:if is="$headerHtml is not empty">
<div class="p-body-header">
{$headerHtml|raw}
</div>
<xf:elseif contentcheck="true" />
<div class="p-body-header">
<xf:contentcheck>
<xf:if contentcheck="true">
<div class="p-title {{ $noH1 ? 'p-title--noH1' : '' }}">
<xf:contentcheck>
<xf:if is="!$noH1">
<h1 class="p-title-value">{$h1}</h1>
</xf:if>
<xf:if contentcheck="true">
<div class="p-title-pageAction"><xf:contentcheck><xf:pageaction /></xf:contentcheck></div>
</xf:if>
</xf:contentcheck>
</div>
</xf:if>
<xf:if is="$description is not empty">
<div class="p-description">{$description}</div>
</xf:if>
</xf:contentcheck>
</div>
</xf:if>
Even replacing an entire template can cause issues with both XenForo and add-ons. It depends on what changes are made in a XenForo update and what changes were made in the new template for add-ons to interface to them.You keep comparing changing major blocks of code (and honestly in many years I don't recall actually seeing any issues arise from this to the point where the issues can't be resolved) to replacing a template entirely.
A catch-22 is a paradoxical situation from which an individual cannot escape because of contradictory rules or limitations.
I agree, which is why I mentioned using a template in conjunction with a template modification. That allows the admin to edit the template if needed, while still preserving the template modification.XF is admin-centric. It is the admin who assumes the ultimate responsibility of running a website. Template syntax is what an admin controls directly and immediately. As a consequence, he or she is granted a greater scope of action.
In contrast, add-on syntax is what an admin does not have the means or competencies to control directly and immediately. The latter situation creates its own risks and XF addresses them through an ad hoc safety measure.
We use essential cookies to make this site work, and optional cookies to enhance your experience.