Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-11-13 04:13:47

Inquisitor217
New Member
Registered: 2006-11-13
Posts: 4

Trying to get article titles all on the same line

Hi,

I have been looking for my answer but I haven’t been able to find it. I have about 20 article titles that when clicked link to the body of the article. Right now they all are shown as a list but I would like to try to get these article titles on one or two lines. The article titles are dates and look like this:

2006
2005
2004

I want them to look like this: 2006 2005 2004

Do I need to change something in my form to get this to work or is it a CSS issue? Any help would be appreciated. Thanks

The code I have right now on the page is

<txp:if_article_list>
<txp:article_custom limit="100" form="prf_people_detail" category="journal-articles"  sortby="Title" sortdir="desc" listform="prf_pub_list" />
</txp:if_article_list>


<txp:if_individual_article>
<txp:article />
</txp:if_individual_article>

Offline

#2 2006-11-13 06:01:29

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Trying to get article titles all on the same line

Please post the forms. I have no idea what HTML is being generated.

Though this won’t solve your problem, you can simplify your page template too:

<txp:if_article_list>
	<txp:article_custom limit="100" form="prf_pub_list" sort="Title desc" />
<txp:else />
	<txp:article />
</txp:if_article_list>
  • sortdir and sortby are deprecated)
  • category is only valid on <txp:article_custom />. Textbook

Offline

#3 2006-11-13 15:01:11

Inquisitor217
New Member
Registered: 2006-11-13
Posts: 4

Re: Trying to get article titles all on the same line

Hi,

Here are the forms I am using.

 prf_pub_list

<a href="<txp:permlink />" title="<txp:title />"><h3><txp:title /></h3></a>

prf_people_detail

<!-- sub item -->
<div class="item">
<h2><txp:title /> </h2>
<txp:body />
</div>
<!-- /sub item -->

Offline

#4 2006-11-13 15:20:18

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Trying to get article titles all on the same line

Change prf_pub_list to:

<li><a href="<txp:permlink />" title="<txp:title />"><txp:title /></a></li>

Change your page template to:

<txp:if_article_list>
	<ul id="article_list">
		<txp:article_custom limit="100" form="prf_pub_list" sort="Title desc" />
	</ul>
<txp:else />
	<txp:article />
</txp:if_article_list>

Then add this as your css:

#article_list li {
	display: inline;
}

I’m assuming you want prf_pub_list to be used in article lists. listform is deprecated.

Last edited by jm (2006-11-13 15:21:37)

Offline

#5 2006-11-13 15:45:41

Inquisitor217
New Member
Registered: 2006-11-13
Posts: 4

Re: Trying to get article titles all on the same line

Thanks a lot, it works well. The only problem I am having now is that I have too many titles causing the line to go wider than the layout. I am thinking I will have to break them up in some way.

Offline

Board footer

Powered by FluxBB