Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-10-03 10:51:23

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

Re: Hack <txp:article_image /> to just output the URL

gaekwad wrote:

This is what I have as the article image: http://ad.linksynergy.com/fs-bin/show?id=j6vpFg*1lv0&bids=305847.10000753&type=3&subid=0&u1=prag

Then that’s the issue. <txp:images> looks for an ID to match in the database. If you don’t have that, it checks for a URL in the article image and uses that inside a full <img> tag.

What you probably want to do is this unsupported hack-ette:

<txp:custom_field name="article_image" />

(edit: though it’s unsupported, it’s not going away because it’s damn handy!)

Last edited by Bloke (2013-10-03 10:53:20)


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

Offline

#14 2013-10-03 10:55:45

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

Re: Hack <txp:article_image /> to just output the URL

Bloke wrote:

<txp:custom_field name=“article_image” />

Clever! Thanks, Stef.

Last edited by gaekwad (2013-10-03 11:02:19)

Offline

Board footer

Powered by FluxBB