MyBB Community Forums

Full Version: Template Not Being Evaluated
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the main page template, I have:
<td valign="top">
{$page_table}
</td>

page_table template:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="5"><div><a href="#">Thing</a></div><strong>Thing</strong></td>
</tr>
<tr>
<td class="tcat" width="40%"><strong>Thing</strong></td>
<td class="tcat" width="15%" align="center"><strong>Thing</strong></td>
<td class="tcat" width="15%" align="center"><strong>Thing</strong></td>
<td class="tcat" width="15%" align="center"><strong>Thing</strong></td>
<td class="tcat" width="15%" align="center"><strong>Thing</strong></td>
</tr>
<tr>
<td class="trow1" width="100%" colspan="5">Sorry, no things listed currently.</td>
</tr>
</table>

Whenever I load the page, the entire page_table is being excluded.
I copy and paste that exact HTML into the main page template, works fine.

What am I doing wrong?
Double checked spellings, everything I thought it could be.
are you using a plugin file to fetch & display your page_table template ?

if you are not using plugin file to get the template content then see replies here
(2016-04-30, 03:35 AM).m. Wrote: [ -> ]are you using a plugin file to fetch & display your page_table template ?

if you are not using plugin file to get the template content then see replies here

Hmph, well I reached a solution myself.
Inlcuding a 
	eval("\$page_table = \"".$templates->get('page_table')."\";");
statement worked for me.
It's a custom PHP page.

I'm not sure if that's standard for the evaluation of templates, or they should've been included with just including the template name.
^ yes, that is the standard method. see adding custom php page in MyBB
Make sure to add this after the eval()

output_page($page_table);