Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-14 11:59:59

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Use custom fields to link related articles

Because of the way I have this particular website structured, I can’t use the Category fields to link related articles. So I’m left using my keywords field or a custom field to link related articles.

I found a plug in that allows related articles linking using the category fields. However, it doesn’t do it cross category, which rules my site out (since all my related items are in different categories and I can’t add more categories than what I have.)

I believe I found another plug in that does the related articles association through the keyword field, but I’m using the keywords field for meta tags at the moment, which leaves me with custom fields. Does anyone have any suggestions on how to do this? Or is this ripe for a plug-in?

Thanks!

Offline

#2 2005-10-18 18:35:12

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Use custom fields to link related articles

Suggestions anyone? Or do I need to give more details?

Thanks!

Offline

#3 2005-10-18 19:13:57

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Use custom fields to link related articles

Could you use something like <code><txp:if_custom_field name=“FieldName” val=“The Value”></code>?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2005-10-18 22:17:09

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

Re: Use custom fields to link related articles

Not sure if this would help you?

Offline

#5 2005-10-21 19:33:57

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Use custom fields to link related articles

(Sorry about the late reply…forgot to subscribe to this thread!) Thanks for the suggestions, however, neither worked for me.

> thebombsite wrote:

> Could you use something like <code><txp:if_custom_field name=“FieldName” val=“The Value”></code>?

The issue was how to get all the articles that had the same value in the custom field to display, so this wasn’t working for me. :/

> doggiez wrote:

> Not sure if this would help you?

I tried that, but couldn’t make it work.

So I broke down and wrote a script to display the appropriate matching articles. You can see it in the left hand columns of these examples:

<a href=“http://www.aprettyrock.com/shop/jet-teardrop-choker”>http://www.aprettyrock.com/shop/jet-teardrop-choker</a>

<a href=“http://www.aprettyrock.com/shop/gold-freshwater-pearl-cluster-y-necklace”>http://www.aprettyrock.com/shop/gold-freshwater-pearl-cluster-y-necklace</a>

I think it works well, so I’m going to stick with it. :)

Offline

#6 2005-10-21 20:46:59

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

Re: Use custom fields to link related articles

So I broke down and wrote a script to display the appropriate matching articles.

Nice. So you are using custom fields to display the related articles? Couldn’t you make a plugin out of it? I’m sure lots of people would like that.

Offline

#7 2005-10-21 22:25:41

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Use custom fields to link related articles

> doggiez wrote:

> bq. So I broke down and wrote a script to display the appropriate matching articles.

Nice. So you are using custom fields to display the related articles? Couldn’t you make a plugin out of it? I’m sure lots of people would like that.

***

I suppose I could. Just don’t know how to get started writing a plug-in. :)

Offline

#8 2005-10-22 02:14:10

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Use custom fields to link related articles

Templates are here : <a href=“http://forum.textpattern.com/viewtopic.php?id=10330”>Forum</a>, the functions are compiled to a text file, and then loaded under the admin tab. The templates are pretty clear as to how they are laid out.

Offline

#9 2005-11-10 22:04:26

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Use custom fields to link related articles

Chalk up one vote for that Plug-in.

)

Tom

Offline

#10 2005-12-05 18:45:54

jordi
Member
From: Barcelona
Registered: 2005-09-14
Posts: 94
Website

Re: Use custom fields to link related articles

Me too! I could use that…

Offline

#11 2005-12-20 11:39:19

mearso
Member
From: Wales
Registered: 2004-03-25
Posts: 18
Website

Re: Use custom fields to link related articles

I use this method

<code><txp:if_custom_field name=“relatednav” val=“70”>
<txp:article_custom form=“bodyonly” id=“70” />
</txp:if_custom_field></code>
Currently I have a list of all the related navs in a form and I have to manually add one when a new one is created by the authors of the pages. I know this is a clunky way of doing it. But what I would like is the ability to get something like this

<code><txp:if_custom_field name=“relatednav” val=“70”>
<txp:article_custom form=“bodyonly” id=”<txp:custom_field=“relatednav” />”
</txp:if_custom_field></code>

Any suggestions?

Offline

#12 2005-12-20 22:09:30

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

Re: Use custom fields to link related articles

Offline

Board footer

Powered by FluxBB