I’m trying to use EE variables to set the body class for different pages, but I’m using templates for the header & footer so it doesn’t work as expect. Here’s my code. Any idea why it might not be working?
index.php - the template file for the homepage
{assign_variable:my_weblog="default_site"}
{assign_variable:my_template_group="site"}
{assign_variable:body_class="homepage"}
{embed="includes/html_header"}
{embed="includes/content_header"}
content_header.php
</head>
<body>
<div id="wrapper" class="{body_class}">
<div id="logo">
<h1><a href="/" title="Back to Sweet Media Homepage">/site_images/sweet_logo.png</a></h1>
</div>However, in the generated code you just see the text {body_class} as is and it hasn’t been parsed.
I must be doing something wrong.
Any ideas?