Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-12 18:34:56

molly
Member
From: Virginia
Registered: 2004-08-15
Posts: 44
Website

...use custom field for meta information?

In each section’s page, I want a set of meta keywords, plus maybe one or two specific keywords for each article, which I have put in a custom field I named “meta-keywords”.

I figured out I needed to use an article form to use the “txp:custom_field” tag, so I set it up this way:

Page:
<code><meta name=“keywords” content=“bling, bling, hey, notice, me<txp:article form=“meta-keywords” />” /> </code>

form “meta-keywords”:
<code> <txp:if_custom_field name=“meta-keywords”>, <txp:custom_field name=“meta-keywords” /></txp:if_custom_field></code>

It works great, except that for articles that have comments turned on, the comments and comment form show up.

How can I do this for an article with comments, without the article form displaying the comments?

Many thanks in advance,
Molly

Last edited by molly (2006-02-12 21:27:57)

Offline

#2 2006-02-13 00:44:46

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: ...use custom field for meta information?

two options to consider:

  • use if_section conditionals if you don’t have many sections (and forget about using articles to hold metadata)
  • create one ‘sticky’ article for each section (solely for metadata purposes) and call it using txp:article status="sticky"

Offline

Board footer

Powered by FluxBB