Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-06 09:30:04

wspence
Member
Registered: 2006-09-03
Posts: 84

Different article views

So I’m trying to do something different here with textpattern…here’s the output i want to accomplish

<p class=“Excerpt”>blah blah blah</p> <—excerpt title easy got that
<p class=“Tag”>April 04, 2007 – 04:25PM CT <—time posted pulled by textpattern – by <a href=”/authors/author/”>Author name</a> <—link to the author’s page
</p>
<p class=“Options”>
<a href=”/news/number/blah”><img src=“http://www.jotzeo.com/images/full-story.gif” alt=“Full Story”></a> <— Full Story link
<a href=“http://talk.jotzeo.com/”><img src=“http://www.jotzeo.com/images/discussion.gif” alt=“Discussion”></a> <— Discussion link

and this is what i have so far…please help me out with what i should put here

<txp:if_article_list> <! — list page: display the short version — > <h3 class=“Headline News”><txp:title /></h3>
<p class=“Excerpt”><txp:excerpt /></p>
<p class=“Tag”>April 04, 2007 – 04:25PM CT <— time generating??? – by <a href=”/authors/author/”>Author name</a> <— author link??
</p> <txp:permlink”><span>full story</span></a>
</txp:permlink><br /><br />
<p></p> </txp:else /> <! — article page: display the complete article — > <txp:body /> </txp:if_article_list>

it being 5 in the morning doesn’t help my cognitive processes either soooooo….yeah going to take try this again in the morning

(Edit: updated discussion topic. -Mary)

Last edited by Mary (2007-04-07 18:32:35)

Offline

#2 2007-04-06 09:57:51

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

Re: Different article views

Try this out:

<txp:if_article_list>
	<h3>
		<txp:title />
	</h3>
	<txp:excerpt />
	<p>
		<txp:posted format="%B %d, %Y – %I:%M%p" /> – by <txp:author link="1" />
		<br />
		<txp:permlink>full story</txp:permlink>
	</p>
<txp:else />
	<txp:body />
</txp:if_article_list>

I simplified the HTML a bit, so it’s easier to read. The date format comes from PHP’s strftime function, and txp:author is from the TextBook.

Last edited by jm (2007-04-06 10:00:55)

Offline

#3 2007-04-06 15:23:04

wspence
Member
Registered: 2006-09-03
Posts: 84

Re: Different article views

many thanks jm

Offline

Board footer

Powered by FluxBB