Topic: 2 Columns - different categories

Hello.
I am having my short news homesite in two columns.

I'd like to have those two columns for two different categories.

There is a draft attached  so you know what i mean.
I am using the "left" container and CuteNews 1.4.6

Thank you.

Re: 2 Columns - different categories

<div style="float: left;">
<?php
$number="21";
$category = "1"; 
$template = "Default";
include("/lalala/cutenews/show_news.php");
?>
</div>

<div style="float: right;">
<?php
$number="21";
$category = "2"; 
$template = "Default";
include("/lalala/cutenews/show_news.php");
?>
</div>

Re: 2 Columns - different categories

<div style="float: left;">
<?php
$number="21";
$category = "1"; 
$template = "Default";
include("/lalala/cutenews/show_news.php");
?>
</div>

<div style="float: right;">
<?php
$number="21";
$category = "2"; 
$template = "Default";
include("/lalala/cutenews/show_news.php");
?>
</div>

And how you can put 2 columns in the same category?

As the current.

Re: 2 Columns - different categories

I've used this one for the current two (or more) columns: https://cutephp.com/forum/index.php?showtopic=31597

Thanks Bukreevlad. I will try your code. I think I already did but just a lil mistake and it doesn't work. hmm

Re: 2 Columns - different categories

It's not working.
This is my script:


<LINK REL="stylesheet" HREF="/images/news.css" TYPE="text/css">
<style>

#container
{
position:absolute;
width:150px;

height: 100%;
overflow: no;
}
.left
{

width: 50%;
float:left;
}
if(isset($_GET['cid']))
$category = $_GET['cid'];
elseif(!isset($_REQUEST['subaction']))
$category = "1"
</style>
</HEAD>
<BODY TEXT="#000000" LINK="#FF0000" ALINK="#FF0000" VLINK="#FF0000" topmargin="10">

<div class="container">

<?PHP
if(!isset($_REQUEST['subaction']) || empty($_REQUEST['subaction']))
$category="12";


$number="22";
$template="left";
include("html/news/show_news.php"); ?>

</div>

6 (edited by 2013-10-14 13:17:52)

Re: 2 Columns - different categories

And how you can put 2 columns in the same category?

As the current.

I have not, I just wrote a template. I have all different. I wrote a special code - Ajax loading posts, sending comment...
You can create a second file: show-post.php

<?php
$template = "Default";
include("/lalala/cutenews/show_news.php");
?>

And in index.php add the line: $PHP_SELF Will be something like:

<?php
$template = "Default";
include("/lalala/cutenews/show_news.php");
$PHP_SELF = 'show_post.php';
?>

All links to the full post will be opened in the file show-post.php

Re: 2 Columns - different categories

I'd appreciated if anyone cuold help me. I'm trying and trying. but nothing works https://cutephp.com/forum/style_emoticons/default/sad.gif

Re: 2 Columns - different categories

I wrote a special code.

Posts: 8

Pages 1

You must login or register to post a reply

CutePHP Forums → Problem Solving / Help & Support → 2 Columns - different categories