XF 2.1 Am I using $head right?

cmpe

Active member
I wanted to add some custom html into the <head></head> and then I saw this in PAGE_CONTAINER:
Code:
    <xf:foreach loop="$head" value="$headTag">
        {$headTag}
    </xf:foreach>

So in my template that I am loading through my controller, I have something like this:
Code:
<xf:page option="head.abc" value="{$customHead}" />

With $customHead being passed as a param. This seems to work fine but for my OCD brain, I wanted to ask if this is the correct way to use $head because I couldn't find any examples of its use anywhere.

thx
 
You can use:

HTML:
<xf:head option="abc">{$customHead}</xf:head>

It technically boils down to the same thing, but it's a bit cleaner/clearer. Depending on how you're building {$customHead} it may make more sense to do it directly in the template, but I suppose that's a different matter.
 
Back
Top Bottom