Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-01-15 18:51:25
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
How do I insert a return of paragraph formatting to article listing?
The code below sits on a page with section links – these all flow together. How do I get them to list properly- one below the next. Also the exerpts do not show (but do in the article themselves)
<p><txp:if_article_list section=“it”>
<!— excerpt only —>
<txp:excerpt />
<txp:permlink>read more..</txp:permlink>
<txp:else />
<!— full article body —>
<txp:body />
</txp:if_article_list></p>
<code>http://www.wrightplace.co.uk</code> the ‘it articles’ displays the problem.
What am I missing here?
Cheers!
Mike
Offline
#2 2006-01-15 18:53:04
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
<code>
<p><txp:if_article_list section=“it”>
<!— excerpt only —>
<txp:excerpt />
<txp:permlink>read more..</txp:permlink>
<txp:else />
<!— full article body —>
<txp:body />
</txp:if_article_list></p>
</code>
Sorry forgot the code tags!
Offline
#3 2006-01-15 19:03:34
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How do I insert a return of paragraph formatting to article listing?
wmike wrote:
The code below sits on a page with section links – these all flow together. How do I get them to list properly- one below the next. Also the exerpts do not show (but do in the article themselves)
<code>
<p><txp:if_article_list section=“it”>
<!— excerpt only —>
<txp:excerpt />
<txp:permlink>read more..</txp:permlink>
<txp:else />
<!— full article body —>
<txp:body />
</txp:if_article_list></p>
</code>
<code>http://www.wrightplace.co.uk</code> the ‘it articles’ displays the problem.What am I missing here?
Cheers!
Mike
You can’t use the attribute section in <txp:if_article_list>
, and you can’t use tags like <txp:excerpt />
and <txp:body />
on a page. Try something like this:
<code>
<txp:if_section name=“it”>
<txp:article form=“yourform” listform=“yourform” limit=“nn” />
</txp:if_section>
</code>
The form “yourform”:
<code>
<txp:if_article_list>
<txp:title />
<txp:excerpt />
<txp:else />
<h2><txp:title /></h2>
<txp:body />
</txp:if_article_list>
</code>
Or you can create two different forms for the individual article (form=) and the article list (listform=).
Offline
#4 2006-01-16 07:43:47
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
Hi Els,
Thanks for that.
If I use the code suggested – I get a server 404 error.
I now have
<code><txp:article_custom section=“it” sortby=“Posted” sortdir=“desc” excerpted=“y” listform=“default” /></code>
This still displays article links in one long row without the excerpts showing.
Any ideas?
Cheers!
Mike
Offline
#5 2006-01-16 08:01:39
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
Further…
My IT articles page also has a h1 tagged heading – <code><h1>IT articles</h1>
<txp:article_custom section=“it” sortby=“Posted” sortdir=“desc” excerpted=“y” listform=“default” /></code>
This fails to show on the page also.
Offline
#6 2006-01-16 09:52:20
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
My article form contains: <code<h1><txp:permlink><txp:title /></txp:permlink> ·</h1>
<!— excerpt only —>
<txp:excerpt />
<txp:permlink>read more..</txp:permlink></code>
Offline
#7 2006-01-16 13:35:56
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
<coe><h4><txp:permlink><txp:title /></txp:permlink></h4>
<p><txp:excerpt /><txp:permlink>(read more..)</txp:permlink></p></code>
Can anyone tell me what is wrong with this please – I want the list to be shown thus;
a. /br
b. /br
etc
Or just wrapped in <p> tags – I can’t seem to work this out.
Also – the excerpts also fail to show.
Cheers!
Mike
Offline
#8 2006-01-16 13:40:15
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
<code><h4><txp:permlink><txp:title /></txp:permlink></h4>
<p><txp:excerpt /><txp:permlink>(read more..)</txp:permlink></p></code>
Can anyone tell me what is wrong with this please – I want the list to be shown thus;
a. /br
b. /br
etc
Or just wrapped in <p> tags – I can’t seem to work this out.
Also – the excerpts also fail to show.
Cheers!
Mike
Offline
#9 2006-01-16 14:58:02
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How do I insert a return of paragraph formatting to article listing?
So this should be on your page:
<code>
<txp:if_section name=“it”>
<h1>IT articles</h1>
<txp:article_custom section=“it” sortby=“Posted” sortdir=“desc” excerpted=“y” listform=“default” />
</txp:if_section>
</code>
Is it on the default page or on another page?
And did you set section ‘it’ to use this page? (if you’re using a specific page for this section you can leave out the <txp:if_section>
tags).
And are you sure that this:
<code>
<h4><txp:permlink><txp:title /></txp:permlink></h4>
<p><txp:excerpt /><txp:permlink>(read more..)</txp:permlink></p>
</code>
is your default form? Because that’s the form your article tag says to use.
If you haven’t turned off Textile for excerpts, then the excerpt is already wrapped in <p>
tags, you don’t need to have them in your form. So you could use:
<code>
<h4><txp:permlink><txp:title /></txp:permlink></h4>
<txp:excerpt />
<p><txp:permlink>(read more..)</txp:permlink></p>
</code>
Offline
#10 2006-01-16 16:33:40
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
Hi Els,
Getting more confused by the second – take a look at the site – <code>http://www.wrightplace.co.uk</code>
The it articles link now just results in (read more).
I have followed your advice – my ‘it section’ uses the default page.
Defautl page code:
<code>
<!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” xml:lang=“en” lang=“en”>
<head>
<meta http-equiv=“content-type” content=“text/html; charset=utf-8” />
<link rel=“stylesheet” href=”<txp:css />” type=“text/css” media=“screen” />
<title>WrightPlace Consulting – <txp:page_title /></title>
</head>
<body>
<div id=“container”>
<div id=“accessibility”>
<a href=”#content” title=“Go to content”>Go to content</a>
<a href=”#sidebar-1” title=“Go to navigation”>Go to navigation</a>
<a href=”#sidebar-2” title=“Go to search”>Go to search</a>
</div> <!— /accessibility —>
<!— head —>
<div id=“copyright”>copyright WrightPlace Consulting 2005©</div>
<div id=“topt”>t. +44 1953 457116 | </div>
<div id=“topemail”><a href=“mailto:customerservice@wrightplace.co.uk”>email us</a></div>
<img src=“images/3.jpg” alt=“Welcome to WrightPlace Consulting – making IT easy! />
<div id=“content”>
<!— left —>
<div id=“sidebar-1”>
<p><a href=”/making-it-easy-with-wrightplace-consulting”>home</a></p>
<p><a href=”/wrightplace-consulting-the-team”>about us</a><p>
<p><a href=”/why-us”>why us?</a><p>
<p><a href=”/contact-us”>contact us</a><p>
<p><a href=”/what-our-customers-think”>customer views</a><p>
<p><a href=”../cgi-bin/forum/Blah.pl” target=”_blank”>the forum</a></p>
<p><a href=”../blog/index.php” target=”_blank”>blog</a></p>
<p><a href=”/code-of-practise”>code of practise</a><p>
<h4 class=“top10”>Services</h4>
<p class=“top10”><a href=”/it-sprint”>IT sprint</a><p>
<p><a href=”/it-training”>IT training</a><p>
<p><a href=”/web-marketing”>web marketing</a><p>
<h4 class=“top10”>Articles</h4>
<p class=“top10”><a href=”/it-articles”>it articles</a><p>
</div>
<!— right —>
<div id=“sidebar-2”>
<txp:search_input label=“Search” wraptag=“p” /> <txp:popup type=“c” label=“Browse” wraptag=“p” /> <p><txp:feed_link label=“RSS” /> / <txp:feed_link label=“Atom” flavor=“atom” /></p>
<p><img src=“textpattern/txp_img/txp_slug105x45.gif” alt=“textpattern” /></p>
</div>
<!— center —>
<div id=“content2”>
<txp:article />
<txp:if_individual_article>
<p>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
<txp:link_to_next><txp:next_title /></txp:link_to_next>
</p>
</txp:if_individual_article>
<txp:if_article_list>
<p>
<txp:older>Previous</txp:older>
<txp:newer>Next</txp:newer>
</p>
</txp:if_article_list>
</div>
</div>
<!— footer —>
<div id=“foot”> </div>
</div>
</body>
</html>
</code>
Sorry if I’m being a bit stupid here – obviously, I’m missing something simple.
Many thanks for your help.
Cheers!
Mike
Offline
#11 2006-01-16 16:42:02
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
the two articles that should be displayed have the following set;
section=it
catagory=it
Offline
#12 2006-01-16 16:43:30
- wmike
- Member
- Registered: 2006-01-03
- Posts: 44
Re: How do I insert a return of paragraph formatting to article listing?
default form:
<code>
<h4><txp:permlink><txp:title /></txp:permlink></h4>
<p><txp:excerpt /><txp:permlink>(read more..)</txp:permlink></p>
</code>
Offline