Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Templat Issue
Zen
Posted on 06 Oct 2009, 18:12:33

Access: Member
Total Posts: 5
Joined: 2009-09-16

Okay, I have read through the forum and see that I can specify a template in the include statement, which I have done:

<?php
$template[]='Staff';
$cat[]='Staff';
include 'news/index.php';
?>

Yet it continues to display the default format no matter what I do... now I did see that when I tried to create a copy of the default template to edit, I received an error:


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's profile.

So instead I created a new template and that all seemed to go fine. The short story feature/full story links also do not seem to work... I am running with PHP5 and MySQL 5.0.81 so it seems that everything should work.. any advice or insight?
#928
Chris
Posted on 06 Oct 2009, 18:16:17

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Use $template instead of $template[]
Because you can only assign 1 template to each include you set it using a variable $template, for things that can be set to numerous values, like categories, they use an array []
#929
Last edited by Chris at 2009-10-06 18:19:39 Reason:
Rrmccabe
Posted on 19 Nov 2009, 21:00:08

Access: Member
Total Posts: 11
Joined: 2009-11-17

I am having the same issue.

I believe my code is correct.

<?php
include 'news/index.php';
$template = 'phsmall';
?>

I have a template called phsmall. But the page with above code always reverts to default template.

Rich
#1201
Chris
Posted on 19 Nov 2009, 21:26:46

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Place the $template before the include.

Code:
<?php 
$template 
= 'phsmall';
include 
'news/index.php';
?>
#1202
Network-13.com © 2013