Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-08 02:14:33

Rocamm
Member
Registered: 2006-05-20
Posts: 20

Navigation of two posts per Page?

One problem I’ve run into is that it doesn’t seem possible to setup
Textpattern so that it will display two post per page with a sensible
navigation link.

wwww.rocamm.com

If you click the More link on the homepage you’ll see that you only
get one new image per page. I can’t find any way around this –
nor any documentation online relating to this problem –

is there a way around this?
would it work to have two separate articles?

any suggestions?

Offline

#2 2007-01-08 02:38:56

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Navigation of two posts per Page?

Would you post the contents of your page template, please?

Offline

#3 2007-01-08 02:43:40

Rocamm
Member
Registered: 2006-05-20
Posts: 20

Re: Navigation of two posts per Page?

Sure thing,
Here it is, Mary.

-R

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>
<head>
<title>Robin Cameron Portfolio</title>
<link href=”_css/rocammstyle.css” rel=“stylesheet” type=“text/css”>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” />
</head>
<div id=“container”>
<table cellpadding=“0” cellspacing=“0”>
<tr>
<td id=“logo”>
<a href=“home.html”><img src=”_images/nav/logo.jpg” alt=“logo” /></a>
</td>
<td id=“nav”>
<table cellpadding=“0” cellspacing=“0”>
<tr>
<td>
<a id=“works” href=“works.html”><span class=“hide”>works</span></a>
<a id=“shows” href=“shows.html”><span class=“hide”>shows</span></a>
<a id=“projects” href=“index.php?id=16”><span class=“hide”>projects</span></a>
<a id=“archive” href=“archive.html”><span class=“hide”>archive</span></a>
</td>
</tr>
<tr>
<td>
<a id=“news” href=“index.php?id=4”><span class=“hide”>news</span></a>
<a id=“friends” href=“index.php?id=6”><span class=“hide”>friends</span></a>
<a id=“about” href=“index.php?id=5”><span class=“hide”>about</span></a>
<a href=“mailto:robin@rocamm.com?subject=I&nbsp;like&nbsp;drawing&nbsp;too.” title=“send email”><img src=”_images/nav/mail.jpg” alt=“mail” /></a>
</td>
</tr>
</table>

</td>
</tr>

<table cellpadding=“0” cellspacing=“0”>
<tr>
<td>
<div id=“left_content”>

<txp:article form=“main” limit=“1” />

</div>
</td>
<td>
<div id=“right_content”>

<txp:article form=“main” limit=“1” offset=“1” />

</div>
</td>
<td>

</td>
</tr>
<tr>
<td id=“description”>
</a>
</td>
<td id=“paging”>
<txp:older>more ></txp:older>

</td>
</tr>
</table>
</div>
<body>
<!— Start of StatCounter Code —>
<script type=“text/javascript” language=“javascript”>
var sc_project=791495;
var sc_partition=6;
var sc_security=“12a26771”;
var sc_invisible=1;
</script>

<script type=“text/javascript” language=“javascript” src=“http://www.statcounter.com/counter/counter.js”></script><noscript><a href=“http://www.statcounter.com/” target=”_blank”><img src=“http://c7.statcounter.com/counter.php?sc_project=791495&amp;java=0&amp;security=12a26771&amp;invisible=1” alt=“counter create hit” border=“0”></a> </noscript>
<!— End of StatCounter Code —>
</body>
</html>

Offline

#4 2007-01-08 03:35:55

Rocamm
Member
Registered: 2006-05-20
Posts: 20

Re: Navigation of two posts per Page?

Mary,
does it have something to do with the offset?
I changed it to 2 and then to 3
it seems to fix the problem slightly but
it is still unpredictable as to where the posts arrange..
and then it’s repeating them..
hmmm.. I feel closer but am still unsure.

-R

Offline

#5 2007-01-08 09:35:31

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Navigation of two posts per Page?

does it have something to do with the offset?

That’s right. Try the following (I’m just posting the relevant part):

<txp:article form="main" limit="1" pageby="2" />

</div>
</td>
<td>
<div id="right_content">

<txp:article form="main" limit="1" offset="1" />

Offline

#6 2007-01-08 13:37:23

Rocamm
Member
Registered: 2006-05-20
Posts: 20

Re: Navigation of two posts per Page?

Mary,
This code seems to work,
except for the posts seem to repeat —
or go in some sort of strange order..

how does this work,
is there a way to predict the order?
is it based on time of post or nothing at all?

-R

Offline

#7 2007-01-08 16:24:24

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Navigation of two posts per Page?

Try if adding pageby="2" in the second article tag helps, I think you need it in both tags.

The default sort order (if you don’t use attribute sort) is posted, descending.

Last edited by els (2007-01-08 16:25:29)

Offline

#8 2007-01-08 17:39:13

Rocamm
Member
Registered: 2006-05-20
Posts: 20

Re: Navigation of two posts per Page?

THANK YOU MARY!

it’s working fine now!!!
great stuff.
I’m excited to finish it off

Yay Textpattern!

-R

Offline

Board footer

Powered by FluxBB