Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-10-16 11:33:31

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

[SOLVED] Custom field tag conundrum

I have this in an article form for a “Work” section of articles…

<p><txp:excerpt /><span class="hide-landing"><a href="<txp:site_url />work/<txp:article_url_title />" title="<txp:title />"> <txp:custom_field name="More link" /></a> ➳</span></p>

It’s used to create a list of excerpts on the homepage. Each excerpt has it’s own custom “More” text/link via a custom field.

The problem is the the custom field part is not outputting. It outputs the excerpt and arrow, but skips the custom field.

I’m using a similar form for an “Articles” section of articles that outputs below the above form on the homepage (different div) and it works fine…

<p class="excerpts"><txp:excerpt /><span><a href="<txp:site_url />articles/<txp:article_url_title />#decobar" title="<txp:title />"> <txp:custom_field name="More link" /></a></span> ➳</p>

Aside from the few differences with applying selectors and link targeting, the only difference is that the second outputs a single excerpt instead of of several.

Is there a snake here about to bite me?

A tag trace shows this at the top, having the custom field tag indicated. Does that mean it’s recognizing that tag as a problem? …

<!-- Runtime:    0.0266 -->
<!-- Query time: 0.012206 -->
<!-- Queries: 30 -->
<!-- Memory: 7143Kb, <txp:custom_field name="More link" /> -->
<!-- txp tag trace:

And for the record, I also tried changing the name of the field in preferences to “more_link” and using that but it makes no difference, so I don’t think the space in the CF name attribute is an issue.

Last edited by Destry (2012-10-16 11:38:09)

Offline

#2 2012-10-16 11:56:30

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: [SOLVED] Custom field tag conundrum

Ha! Stupid me. It’s not outputting because I DIDN’T ADD THE TEXT IN THE CUSTOM FIELD!

Solved.

Offline

Board footer

Powered by FluxBB