Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Custom Fields
rc3 sv396+sv402.
Custom fields do not show up neither with the rei_show_custom plugin nor with the txp <a href=“http://textpattern.net/wiki/index.php?title=Txp:custom_field_/”>method</a>. sumple url <a href=“http://neme.org/main/137/remarks-on-modernity-mobitity-nomadism-and-the-arts-by-dr-michael-haerdter”>here</a>. Custom fields are on the right under ‘info’. Am I doing something wrong here?
On the page I have included all custom field tags to check whether any would work.
<code><li><txp:if_custom_field name=“custom1”><txp:custom_field name=“custom1” /></txp:if_custom_field></li>
<li><txp:custom_field name=“custom1” /></li>
<li><txp:rei_show_custom /></li></code>
The site is relying on custom fields for certain chunks of information so any help would be appreciated
Edit: I am using the fields within the pages tab.
Last edited by colak (2005-06-06 14:07:09)
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 2005-06-06 14:14:02
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Custom Fields
> colak wrote:
> Edit: I am using the fields within the pages tab.
Colak, I think the tags should be in an article form, so TXP knows from which article to fetch the custom field.
Offline
Re: Custom Fields
thanx doggiez,
I thought that that might have been the reason, that’s why I edited my post. All renders fine now…
EDIT: I was wrong, I am pooling my hair here!
All fields render as per the latest article published. ie, the custom fields shown in the front end repeat themselves in all articles.
here is what I have in an article form called customfields
<code>
<div class=“info”><ul><li><b>Info</b></li>
<txp:if_custom_field name=“custom1”><li><txp:custom_field name=“custom1” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom2”><li><txp:custom_field name=“custom2” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom3”><li><txp:custom_field name=“custom3” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom4”><li><txp:custom_field name=“custom4” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom5”><li><txp:custom_field name=“custom5” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom6”><li><txp:custom_field name=“custom6” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom7”><li><txp:custom_field name=“custom7” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom8”><li><txp:custom_field name=“custom8” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom9”><li><txp:custom_field name=“custom9” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom10”><li><txp:custom_field name=“custom10” /></li></txp:if_custom_field></ul></div></code>
And here’s what I have in the page tab <code><txp:article_custom form=“customfields” limit=“1”/></code>
The limit=“1” is there so as not to have those fields appear 10 times on the page (which they did before I added the limit)
what am I doing wrong here?
Last edited by colak (2005-06-06 17:08:16)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Custom Fields
I have tried every single method I could think of for this one. I guess it might be a bug…
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 2005-06-06 21:58:30
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Custom Fields
No, it’s not a bug, it’s caused by the limit=“1”. This means that always the first article will be displayed (with a descending order that’s your latest article). What you want is, if I understand correctly, to output the custom fields for the article that is shown in the left column. The way you’ve done it now is having two separate article tags on your page, so the one on the right has no connection with the one on the left.
I’m sure there is a way to do it, I’ve seen sites here that show some fields of an article in a different column. Just can’t remember which ones :( and I’m sorry I don’t have the time right now to search for them. But what you want is possible! Hopefully someone who knows how to do it reads your post.
Offline
Re: Custom Fields
did it
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Custom Fields
> colak wrote:
> did it
er… would you care to explain how you did it? I’m stuck in a similar place.
(I want to show custom fields for a given article in a sidebar, I used “limit=1” and, as above mentioned, it does not work. ) Thanks for the attention.
Offline
Re: Custom Fields
I am using the fields within the pages tab.
To my knowledge, custom fields only work when placed in an article form.
Offline
Re: Custom Fields
> jordi wrote:
> > colak wrote:
> did it
er… would you care to explain how you did it? I’m stuck in a similar place.
(I want to show custom fields for a given article in a sidebar, I used “limit=1” and, as above mentioned, it does not work. ) Thanks for the attention.
I created a form called custom_fields….
here’s what I have in it
<code><txp:if_individual_article>
<ul>
<txp:if_custom_field name=“custom1”><li><b><txp:custom_field name=“custom1” /></b></txp:if_custom_field>
<txp:if_custom_field name=“custom2”><txp:custom_field name=“custom2” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom3”><li><txp:custom_field name=“custom3” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom4”><li><txp:custom_field name=“custom4” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom5”><li><txp:custom_field name=“custom5” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom6”><li><txp:custom_field name=“custom6” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom7”><li><txp:custom_field name=“custom7” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom8”><li><txp:custom_field name=“custom8” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom9”><li><txp:custom_field name=“custom9” /></li></txp:if_custom_field>
<txp:if_custom_field name=“custom10”><li><txp:custom_field name=“custom10” /></li></txp:if_custom_field></ul>
</txp:if_individual_article></code>
<code>
<txp:if_article_list>
<ul>
<txp:if_custom_field name=“custom1”><li><b><txp:custom_field name=“custom1” /></b></txp:if_custom_field>
<txp:if_custom_field name=“custom2”><txp:custom_field name=“custom2” /></txp:if_custom_field><txp:if_custom_field name=“custom3”> (<txp:custom_field name=“custom3” />)</li></txp:if_custom_field></ul>
</txp:if_article_list></code>
I then call the form <code><txp:output_form form=“custom_fields” /></code> at the places where I want it to appear.
Hope this helps
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1