Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-12 14:33:25

gerald
Member
Registered: 2006-07-12
Posts: 13

creating a list??

i have a pretty simple thing i’d like to do with textpattern but i pretty much have no idea where to start or how to implement. i’ve searched around but don’t really see what i’m looking for.

okay so on the main page i have all the default entries, and on the right is the search field, etc.

well under the search field i just want to create a simple list that i can update as i please.

for example, TOP TEN MOVIES or something. thats it. doesn’t need to be links or commentable, just a simple list that i can update whenever

how do i do this??

thanks so much for any help you can give me!

Offline

#2 2006-07-12 15:54:16

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: creating a list??

You could create an article specifically for that content and then use the <code><txp:article_custom /></code> tag. It has a <code>id</code> attribute that you specify a specific article to display. For instance: <code><txp:article_custom form=“top_ten_list” id=“3” /></code>.

That’s just one way. I’m sure others exist. The Textbook entry for <code><txp:article_custom /></code> can be found here.

Offline

#3 2006-07-12 17:44:17

gerald
Member
Registered: 2006-07-12
Posts: 13

Re: creating a list??

ok i managed to get that to work without too much problem… but how do i make it not show up on my main article section on the left and only show up on the right??

Offline

#4 2006-07-12 18:32:18

gerald
Member
Registered: 2006-07-12
Posts: 13

Re: creating a list??

i guess basically i just have one category (top_ten) that i don’t want to show up on the main list (left side). not sure how to accomplish that

Offline

#5 2006-07-12 18:39:31

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: creating a list??

That would be dependent on how you’ve laid out your page. Say you did something like this:
<code>
<div id“leftSide”> [main article list] </div>
<div id=“rightSide”> [search form] [top ten list] </div>
</code>
You just put the appropriate <code>article</code> tags in the places where you want the different types of articles to show up. Then you use CSS to style the whole page.

Offline

#6 2006-07-12 22:17:11

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: creating a list??

If you’re working with the default template then you accomplish this easily by placing the txp tags you have in the corresponding <code><div></code> as jdykast has said. You’ll need to put your article tags in the <code><div id=“sidebar-2”></code> if you are using the default.

Could i also suggest that if you’re creating a list that you use list markup. For example you could use this code in your page template:

<code>

<ul class=“linklist”>
<txp:linklist form=“my-links” limit=“10” />
</ul> </code>

and then created a new form called “my-links” with this inside it:

<code><li><txp:linklist /></li></code>

This would be more semantically correct i think. A list for a list.

You can then also style your list in style using <code>ul.linklist</code> and <code>ul.linklist li</code>
and also limit the amount of links you have displayed with <code>limit=“x” /></code>

Last edited by elduderino (2006-07-13 07:41:15)

Offline

#7 2006-07-13 18:34:30

gerald
Member
Registered: 2006-07-12
Posts: 13

Re: creating a list??

yeah i have them in the sidebar-2, but the problem is that they show up in BOTH sides. i’m unclear on how to only show one category on the left side.

Offline

#8 2006-07-14 03:35:49

gerald
Member
Registered: 2006-07-12
Posts: 13

Re: creating a list??

anyone know how i can accompish this?

Offline

#9 2006-07-14 14:13:45

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: creating a list??

If you’re using the default page setup there is a <code><txp:linklist wraptag=“p” /></code> within <code>sidebar-1</code> and then it sounds like you’ve put another linklist in <code>sidebar-2</code>. Without seeing your page template or the output this is what I’m assuming is the cause. I personally don’t use the default page setup so I was looking at Textbook’s listing of the default setup.

Offline

#10 2006-07-14 18:54:29

gerald
Member
Registered: 2006-07-12
Posts: 13

Re: creating a list??

i just created an article that i plan on updating, and used that article id to place on my right column. you can check it out here: www.explodingnow.com

as you can see, the article is also displayed on the main section.

i have 2 article categories: articles, and top-ten

what i’m wondering is, if there’s a way to not have “top-ten” show up on the main section.

or if there’s another way to “hide” my top-ten post from the main section.

Offline

#11 2006-07-14 22:06:01

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: creating a list??

You should be able to use the <code><txp:article_custom /></code> tag. Check the Textbook for more information on this tag. For your site you could use it in two places: once in the main section and again in the sidebar. In the main section use it something like this: <code><txp:article_custom category=“normalArticles” /></code> and in the sidebar something like this: <code><txp:article_custom category=“topTen” /></code>.

When you’re doing page layout (Presentation > Pages) there are some handy links on the left. Those will often generate the tag you need just by asking you a few details. Also, poke around the Textbook — there are tons of resources there.

Offline

#12 2006-07-15 03:22:50

gerald
Member
Registered: 2006-07-12
Posts: 13

Re: creating a list??

awesome, thanks you so much.

Offline

Board footer

Powered by FluxBB