Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-04-11 13:52:45

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

custom fields for links

Hi, awesome Textpattern people,

I want to be able to add 1 or 2 custom fields or “additional values” to the links I store in the link panel.

Apart from dumping everything in the description field and parsing it at runtime, is there a way, a plugin to achieve that?
I’ve done some research in the forum but nothing is showing up…

Thanks for any idea :)

Offline

#2 2018-04-11 14:54:40

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,611
Website

Re: custom fields for links

Hi Aleth,

I have a simple plugin called jcr_link_custom which adds one custom field to the links panel (there are similar plugins for the images and files pane too).

You can easily expand it to add more than one extra field if you want by editing the code. Should you need any pointers on how to do that (which I suspect you won’t), it’s based on “wet profile” (link on my github page) which adds two fields to the author’s pane. Just transfer that principle back to my plugin…


TXP Builders – finely-crafted code, design and txp

Offline

#3 2018-04-11 15:54:56

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: custom fields for links

Awesome !!!
Thanks so much Jakob :)

Offline

#4 2018-04-23 22:06:15

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: custom fields for links

I’m using smd_if on complete links in custom fields. The plugin analyzes for reoccurring strings like “facebook” and when true, then automatically showing a respective link text for the link surrounding it.
Example: <a href="https://www.facebook.com/jayrope2">Facebook.</a>

Might come in handy.

Last edited by jayrope (2018-04-23 22:09:33)


A hole turned upside down is a dome, when there’s also gravity.

Offline

Board footer

Powered by FluxBB