| Author |
Message |
krzysiekk
Joined: 25 Nov 2007 Posts: 3
|
|
Problem 2 category in one page |
|
Hi I have problem
I want include 2 category on one page but different space..
when I include show me error:
 |  | Warning: Cannot modify header information - headers already sent by (output started at /users/k****/www/at*****.org/admin/inc/show.news.php:235) in /users/k*****/www/at******.org/admin/show_news.php on line 1 |
please help me
|
|
| Wed Sep 24, 2008 11:52 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 301
|
|
|
|
what is your include code?!
|
|
| Wed Sep 24, 2008 12:37 pm |
|
 |
krzysiekk
Joined: 25 Nov 2007 Posts: 3
|
|
|
|
<?
$number = '10';
$template = 'Default';
$category = '1';
include('admin/show_news.php');?>
and
<?
$number = '2';
$category = '7';
$template = 'Default3';
include('admin/show_news.php');?>
|
|
| Wed Sep 24, 2008 12:48 pm |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 301
|
|
|
|
<?PHP
$number = '10';
$template = 'Default';
$category = '1';
include($cutepath.'/show_news.php');
?>
and
<?PHP
$static['number'] = '2';
$static['category'] = '7';
$static['template'] = 'Default3';
include('admin/show_news.php');?
>
|
|
| Wed Sep 24, 2008 1:51 pm |
|
 |
nam

Joined: 23 Dec 2006 Posts: 141
|
|
I am pazzled with templates |
|
Dear Partyism,
I am very much puzzled with the template and the way they are used in CNR. I have posted a number of questions on this forum but no one answer.
I followed the way you've posted the include code above, it works fine in the index page, but when click on to view the full news, the Default template is used for all the posts regardless of their category.
What do you suggest to solve it?
And next question is: when you create a category, there you can also specify the template for it, but practically it has no impact and Default template is used instead. So what is the need of it?
To be brief, I have different templates for different categories, but can’t manage to practically use them for the related categories.
Thanks in advance for your any help.
|
|
| Wed Sep 24, 2008 3:59 pm |
|
 |
pollawat88
Joined: 29 Mar 2007 Posts: 10
|
|
Re: I am pazzled with templates |
|
 |  | Dear Partyism,
I am very much puzzled with the template and the way they are used in CNR. I have posted a number of questions on this forum but no one answer.
I followed the way you've posted the include code above, it works fine in the index page, but when click on to view the full news, the Default template is used for all the posts regardless of their category.
What do you suggest to solve it?
And next question is: when you create a category, there you can also specify the template for it, but practically it has no impact and Default template is used instead. So what is the need of it?
To be brief, I have different templates for different categories, but can’t manage to practically use them for the related categories.
Thanks in advance for your any help. |
when u added news or edited news ,u had to chose the template what u like before
|
|
| Thu Sep 25, 2008 12:50 am |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 301
|
|
|
|
yo nam,
Check my website http://www.partyism.nl It has the same as you wanted. Four includes on the frontpage all working in different templates/styles.
When you include your news you have to set a template. So if you whant to show your related news in a different template for example: create a template "related"
Include your related news as followed
<?PHP
$static['number'] = '5';
$static['category'] = '1,2,3,4,5,6';
$static['template'] = 'related';
include('admin/show_news.php');
?>
ps what is your website?
|
|
| Thu Sep 25, 2008 10:50 am |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 301
|
|
|
|
also make sure that in your admin section -> manage categories you set the template at your wish
|
|
| Thu Sep 25, 2008 12:33 pm |
|
 |
krzysiekk
Joined: 25 Nov 2007 Posts: 3
|
|
|
|
still not working...
|
|
| Thu Sep 25, 2008 6:54 pm |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 301
|
|
|
|
it should. What is your website again?!
|
|
| Fri Sep 26, 2008 7:52 am |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
Are you still getting the same errors? We might need to see some code to figure out what the problem is cause Partyism gave a very accurate idea of what to do and it works fine. Are you including head.php at the top of your website and all (necessary) pages within?
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me  |
|
| Fri Oct 10, 2008 7:38 pm |
|
 |
|