XF 2.0 Having trouble using {$containerKey}

Jaxel

Well-known member
I am doing a template modification on PAGE_CONTAINER.

Find:
Code:
<div class="p-header-inner">

Replace:
Code:
<div class="p-header-inner 8wayrun-header
    8wayrun-header-{$containerKey}
    8wayrun-header-{$xf.visitor.Profile.custom_fields.header}">

My custom fields variable is being applied correctly... but for some reason, the container key is always blank, even when viewing a node.

Why would this be the case?
 
But if the top of PAGE_CONTAINER can use it, why can't the middle of PAGE_CONTAINER?

Viewing the source of one of my pages has at the top:
Code:
<html id="XF" lang="en-US" dir="LTR"
    data-app="public"
    data-template="forum_view"
    data-container-key="node-167"
    data-content-key=""
    data-logged-in="true"
    data-cookie-prefix="xf_"
    class="XenBase ForumStyleClassic logged-in has-no-js template-forum_view">

As you can see with data-container-key="node-167", $containerKey is being placed properly. Why is it not being placed properly elsewhere in the same template?
 
Code:
data-container-key="node-2"
...
<div class="p-body">
	ckey node-2

Well, it's working for me in the default style.
 
Back
Top Bottom