Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2010-01-29 18:24:52

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: pagination and menu problem [solved]

Hello Els,

No problem.
I did a little for myself.
The script above works only you can see several times Category2.
And As you can see there are a lots of empty things. See http://test.tamarawobben.nl

I hope we could figure out why that happens.

Roelof

Offline

#14 2010-01-29 18:41:56

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: pagination and menu problem [solved]

You have a lot of validation errors, starting with the missing closing quote in your code above: <ul id="topnav>. Then you have an opening <li> tag but also wraptag="li" in your article_custom tag, leading to an extra tag. Further in, the next opening <li> tag should be inside the if_different block. I’d start by fixing those errors.


Code is topiary

Offline

#15 2010-01-29 19:03:39

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: pagination and menu problem [solved]

Hello Jsoo,

Thank you for the tips.
I see now that the script is not working as intented.
Therefore I get several validation errors.
I get now several times <div id=“sub”> where it has to be one time.

So back to the drawing table.

Roelof

Offline

#16 2010-01-29 20:29:22

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: pagination and menu problem [solved]

Hello,

I got a little bit closer to the solution. But i can’t get the ul which has to surround the <li> of the months on the right place.
What I got is this :

<div id="navigation">
<ul id="topnav">
<txp:article_custom  category='<txp:variable name="menu2" />' wraptag="li"  break="" sortdir="asc" limit="999">
      <txp:if_different>
                    <li>  <a href="<txp:site_url />?c=Category2&amp;month=<txp:posted format="%Y-%m" />"><txp:posted format="%b" /></a>
                 </li>
      </txp:if_different>
</txp:article_custom>
</txp:category_list>
</ul>

anyone knows how to handle this one ?

Roelof

Offline

#17 2010-01-29 20:44:45

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: pagination and menu problem [solved]

You have a closing </txp:category_list> tag inside your <ul id="topnav">, but no opening tag. Where is it?

It looks like you could use wraptag="ul" break="li" in your article_custom tag instead of writing out the ul and li tags by hand.

Put your site into debug mode to make sure you aren’t getting any Txp errors.


Code is topiary

Offline

#18 2010-01-29 21:00:03

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: pagination and menu problem [solved]

Hello jsoo.

Thank you for the tip.
This looks a little bit better.
Now figure out why they are empty <li> </li>.

When I go to the debug mode I get this message : Textpattern Notice: sortdir attribute is deprecated on line 678

Roelof

Roelof

Offline

#19 2010-01-29 21:18:39

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: pagination and menu problem [solved]

roelof wrote:

Now figure out why they are empty <li> </li>.

My mistake: go back to using wraptag="li" break="" and add the surrounding ul tags by hand. Then get ride of the li tags inside the if_different block.

When I go to the debug mode I get this message : Textpattern Notice: sortdir attribute is deprecated on line 678

Change sortdir="asc" to sort="Posted asc" in the article_custom tag.

Last edited by jsoo (2010-01-29 21:19:10)


Code is topiary

Offline

#20 2010-01-29 21:23:04

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: pagination and menu problem [solved]

Hello Jsoo,

When I do that we have the same problem as before.
When I set the <ul> before the article_custom tag then i will appear on the wrong place.
When I do it after that tag you will see that every <li> will be surrounded by the ul – tag.

Roelof

Offline

#21 2010-01-29 21:40:25

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: pagination and menu problem [solved]

OK, eventually I may make a correct suggestion :-0

Forget about the wraptag and break attributes — leave those out. Now I see that wraptag="li" generates an li whether or not if_different produces any output. So you need to put the li tags inside the if_different, as you had it originally.

I don’t know where the extra ul is coming from. It’s not in the code you posted.


Code is topiary

Offline

#22 2010-01-29 21:46:11

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: pagination and menu problem [solved]

Hello Jsoo.

I didn;t put it now.
But it works if you leave out the break and put the <li> inside the if-different.
But I see a lot of empty lines now.

Roelof

Offline

#23 2010-01-29 23:08:20

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: pagination and menu problem [solved]

roelof wrote:

I see a lot of empty lines now.

If you want to get rid of those you’ll have to remove most of the line breaks inside your article_custom tag.

You still have an extra opening ul tag.

Also, you have two uls with the same id value, which won’t validate.


Code is topiary

Offline

#24 2010-01-30 08:27:11

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: pagination and menu problem [solved]

Helllo jsoo,

Thank you.
But yesterday i made a thinking error.
I try to use categories and subcategories but txp can’t handle subcategories.

So can this work.

Category : Baby tijd.
Section : 1e levensjaar, 2e levensjaar.
After that the months.

So first read all the categories, after that read all the sections of that category and after that read all the posted months of that section.

Roelof

Offline

Board footer

Powered by FluxBB