Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-15 13:58:47

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,263
GitHub

Parsing contents of custom fields (FIXED)

I’m officially pulling my hair out over this now…I will attempt to explain as fully as possible, any assistance is greatly appreciated. You will also have dibs on my first born if you spot what I’m doing wrong :)

Scenario: using an article’s custom fields to populate sidebar and topbar blocks, both textual and images. Text works fine, but images do not. Image inserting code (a la img src) is not parsed and just displayed inline.
Example: http://emmaandpete.com/deving/testing-stuff (set to debugging status, HTML validates*%2F*%3Bq%3D0.5;accept-language=en-us OK)
CSS: http://emmaandpete.com/textpattern/css.php?n=emmaandpete (validates OK)

Image embed code is parsed OK within the article body context (the 468×60 box in the main article uses the same code to embed as the custom field article-topbar-right:

<img src="/images/box_468x60.png" alt="spacer box:468x60" />

I’m trying two different ways of parsing the data in the fields, neither of which is working. The first method is to use:

<txp:if_individual_article><txp:custom_field name="article-sidebar-lower" /></txp:if_individual_article>

to populate the lower sidebar on the left side (marked accordingly) and the second is a custom article form:

<txp:custom_field name="article-topbar-right" />

to populate the right side on the top bar (not labelled).

Any ideas as to what I might be doing wrong?

Last edited by gaekwad (2009-06-15 14:14:21)

Offline

#2 2009-06-15 14:08:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Parsing contents of custom fields (FIXED)

Does adding escape="" to your custom field tags help?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#3 2009-06-15 14:10:36

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,263
GitHub

Re: Parsing contents of custom fields (FIXED)

Bloke wrote:

Does adding escape="" to your custom field tags help?

Clever chap :) That appears to have fixed it. Thank you mucho, sir!

Offline

Board footer

Powered by FluxBB