Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-12 12:06:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

custom fields to show twice

Is there a way to show the contents of particular custom fields twice in the page?
ie.
In our site we have different authors. The author name/url is in the second custom field.
The particular field at the moment is shown at the top of the page (<code><txp:if_custom_field name=“custom2”>Text: <txp:custom_field name=“custom2” /></code>) but I would also like it to show at the bottom (<code><txp:if_custom_field name=“custom2”></code>&copy; <code>2006 <txp:custom_field name=“custom2” /></code>

Textpattern at the moment parses the field only for the top position and not at the footer. I have also tried the mdn_if_custom plugin with no results. Does anyone have any ideas?

Last edited by colak (2006-02-12 16:44:23)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2006-02-16 08:29:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: custom fields to show twice

Anyone?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2006-02-16 14:12:49

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: custom fields to show twice

It should work if both tags are in one article form. Are you trying to do this in another way?

Offline

#4 2006-02-17 08:14:17

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: custom fields to show twice

> doggiez wrote:

> It should work if both tags are in one article form. Are you trying to do this in another way?
well, I am trying another way.
I have a series of article forms (one for each category). Within them I call another (misc) form which contains the custom fields (as this is the same throughout).

As I would like the cusom field to appear both at the top and the bottom of the document (ie in the custom fields div and the footer div) I created yet another misc form with the following

<code><txp:if_section name=“Article”>
<txp:custom_field name=“custom2” />
</txp:if_section></code>
This second form is not parsed


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2006-02-17 09:59:29

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: custom fields to show twice

What if you make it an article form (you must then use an article tag on your page):
<code>
<txp:if_article_section name=“Article”>
<txp:custom_field name=“custom2” />
</txp:if_article_section>
</code>

Offline

#6 2006-02-17 10:09:18

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: custom fields to show twice

“I have a series of article forms… Within them I call another… form which contains the custom fields…”

There be the problem. What you’ll need to do is place multiple calls to article within your page.

Offline

Board footer

Powered by FluxBB