Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-06 13:00:26

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

articles listed by category1 in a table with 6 colums.. <variables..>

hi and thanks for reading.

i have this little problem.
i try to put out a list of articles in a table with 6 columns.
the articles should be listed by category1. and because there are more than just one article with category1 = f.ex. “flying lotus” i only want to put out that category once..(!!!)

well, i got there. but the output into the table is kind of weird / wrecked.
it puts out what i want, but i cant see, why txp leaves several tables empty.
for example, the first table-row is ok. but the next one only has 1 entry and txp doesnt start putting the output in column 1, but column 4.. or so..

and its not really finding an end, txp keeps dropping closing tags..

and i dont get it. any suggestions..?
thanks for help..

here is the thing:
http://dev.ssc-group.net/

it should look like this one day:
http://313130.net/clients/ssc/
(jaja, ill take care of the styling, when this censored starts workin propperly..)

i call a form via this:
bc. <txp:article_custom limit=“100” section=“artists” form=“tables” sort=“Category1” />

and here is the forms code:

when i post the code in here
and copy paste it into txp
it fucks all up.

so here is the code for download

Last edited by jens31 (2009-05-06 13:15:52)

Offline

#2 2009-05-06 14:30:55

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: articles listed by category1 in a table with 6 colums.. <variables..>

update
i guess i had some errors in the code.
at least i stopped txp from dropping tds and /tds everywhere..

but still:
txp follows my orders only in cell1 (look for the source-code) it leaves alomst all the other cells empty.
i dont get it.

Offline

#3 2009-05-06 16:35:15

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: articles listed by category1 in a table with 6 colums.. <variables..>

seems like i got a little interference with txp:if_difference here. dunno.
looks like i gotta give it up.

Offline

#4 2009-05-06 16:37:19

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: articles listed by category1 in a table with 6 colums.. <variables..>

why don’t you try it with divs? It’ll be so much easier.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2009-05-06 16:47:18

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: articles listed by category1 in a table with 6 colums.. <variables..>

..what do you mean exactly..? instead of table/tr/td?
i started using it, cause it has been like this in this example(3). i wanted to do it with ul/li but i dont know, how to handle the variables, so they tell each element, to move into the right list.
it should be alpabetically one day :)

but i’m interessted in your solution (“so much easier..”).. tell me more, plz :)

*to be more exact on the variable thing:
i dont know what to tell txp, so it devides the categorys (with parent element “something”) into 6 lists and let them move in the correct list.

Last edited by jens31 (2009-05-06 16:50:49)

Offline

#6 2009-05-06 17:23:07

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: articles listed by category1 in a table with 6 colums.. <variables..>

Hi, No time to try to figure it now as I have a deadline. But a quick scan in your page code revealed a txp tag <txp:if_section=",news"> which is not closed. Also Do validate your page as it may help you identify the problem.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2009-05-06 17:42:00

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: articles listed by category1 in a table with 6 colums.. <variables..>

hmm. interessting.
the closing tag just is there, but txp stops right with it. (there is a bit more code below, but its not rendered.)
seems like i messed it all up. got to lay down the work for a while and get some fresh air around my head.
if you find time during the next day, let me know. i heard money motivates.. ;)

let me know, i’m sure, we could figure something out.
thx. laters.

*just dont get me wrong
i did not validate it yet, cause i still was in the middle of it all. i usually do this later, when everything else is working propperly. never thought, that i could stop txp from rendering correctly. so, its validated now, stuff, that cranks around in the validation is from youtube and del.icio.us javascript.

the only thing i need some help on is the navigation. it would be so much nicer, if this would worky dynamically.

Last edited by jens31 (2009-05-06 20:39:32)

Offline

#8 2009-05-06 20:53:01

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,730
Website

Re: articles listed by category1 in a table with 6 colums.. <variables..>

It looks like you’re almost there using your ul li list. If you use this css, you get a grid arrangement with large area rollovers:

#artistList ul, #artistList li {
	list-style-type: none;
}

#artistList li {
	width: 148px;
	float: left;
	margin: 5px 0;
}

#artistList li a {
	display: block;
	width: 100%;
	padding: 5px 0;
}

TXP Builders – finely-crafted code, design and txp

Online

#9 2009-05-06 21:04:35

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: articles listed by category1 in a table with 6 colums.. <variables..>

hi jakob & thanks for your help.
jup, it works fine with this styling.
even if its not devided in 6 several rows.

but i didnt like the FAT buttons ;)

but hey, im still interessted in getting this variable thing to work. just for the hell of it :D

Offline

#10 2009-05-06 22:23:31

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,730
Website

Re: articles listed by category1 in a table with 6 colums.. <variables..>

even if its not devided in 6 several rows

What do you mean by “6 several rows”? Maybe I misunderstood your first example as it shows exactly the same information in each of the six columns. I thought you just wanted a grid which that css does. You can adjust the width and margin to control how many columns you have.

but i didnt like the FAT buttons ;)

Just remove the css for li a. You then have very small click-targets, though.

im still interessted in getting this variable thing to work

What didn’t work? The example you linked to just counts with each cell (like counting on your fingers) so that it knows you should end the row after three cells. It also adds the correct number of blank cells at the end if you don’t fill the last row of the table right to the end. You just extend the principle for six cells but it gets more cumbersome the more columns you have. Using css float is way easier.


TXP Builders – finely-crafted code, design and txp

Online

#11 2009-05-06 22:46:25

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: articles listed by category1 in a table with 6 colums.. <variables..>

hi

yup, you misunderstand the example. i only used the same content.. i was lazy enought to just copy ‘n’ paste..
the thing ist, that i had 6 lists. each one should be alpabetically ordered. so the first column shows the beginning.
the next column than goes on, etc.
but in that case txp has to mathematically find out, how many titles need to be in each column, so each one has the same amount..
and this is where my lacky code brain stops being logically.
cause i dont know, how to get the variable “categories total”, than devide this through 6 (columns) and put the amounts in the 6 columns.
and, dear txp, please dont forget, that “categories total” is properbly not devidable through 6 without any problems..

i guess, that is the time, where txp:php comes in
but i dont get my head even close to this theme..

maybe i should stick with the actual solution.. but i still wont give up..

Offline

Board footer

Powered by FluxBB