Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-09-05 16:42:15

njprrogers
New Member
From: Dublin
Registered: 2008-08-30
Posts: 9
Website

News Section

I’m a newbie so apologies in advance…

I’ve created a mostly static site with a dynamic news section.

I want to display excerpts from the news section on the home page… followed by Read More…

I have tried several things but I keep getting:

Textpattern Notice: Article tags cannot be used outside an article context

I have created a form trying to use txp:excerpt and the kgr_safe_excerpt plugin but I think I am structuring this incorrectly.
Currently I have set the News Section ‘Display on Front Page’ to yes and have embedded a <txp:form> link in my ‘news’ page. I have been trying to generate my articles from the form.

Help!

Offline

#2 2008-09-05 16:47:40

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: News Section

Post the call to the form in your page, plus the contents of the form itself so we can take a look.

Offline

#3 2008-09-05 16:54:38

njprrogers
New Member
From: Dublin
Registered: 2008-08-30
Posts: 9
Website

Re: News Section

In page default:

<txp:output_form form=“news” />

In the form news, type misc (I tried article too)
<txp:excerpt />
and i tried a variety of options on the plugin…

Offline

#4 2008-09-05 17:00:55

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: News Section

You have placed the call to the news form in the News page, which is one reason why nothing displays. It should most likely go in your default page.

Another possible reason is that you have no excerpt in your article. If you don’t have an excerpt, use txp:body instead.

Offline

#5 2008-09-05 17:06:08

njprrogers
New Member
From: Dublin
Registered: 2008-08-30
Posts: 9
Website

Re: News Section

thanks for your help with this…

the call to the news form is in the default page. i have tried txp: body but no joy.

Tag error: <txp:body/> -> Textpattern Notice: Article tags cannot be used outside an article context on line 1964

Offline

#6 2008-09-05 17:15:38

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: News Section

You need a <txp:article_custom /> or <txp:article /> tag to pull the articles from the news section.

In example, on the page template:

<txp:article_custom section="news" form="news" limit="20" />

And in the news article form:

<txp:if_excerpt>
    <txp:excerpt />
<txp:else />
    <txp:body />
</txp:if_excerpt>

Last edited by Gocom (2008-09-05 17:16:22)

Offline

#7 2008-09-05 17:22:33

njprrogers
New Member
From: Dublin
Registered: 2008-08-30
Posts: 9
Website

Re: News Section

Hurrah! :-)

Offline

#8 2010-02-05 12:12:50

jamiecore
New Member
Registered: 2010-02-05
Posts: 1
Website

Re: News Section

Hi i’m looking to use a new CMS system to try out, is this simple to use?

Offline

#9 2010-02-05 13:18:36

maniar
Member
From: Hamilton, Ontario
Registered: 2010-01-04
Posts: 66
Website

Re: News Section

is this simple to use?

Short Answer: Yes

Try out the demo and tell us what you think ?


اردو میں بھی دستیاب Textpattern آپ کے لیے اب

Offline

Board footer

Powered by FluxBB