Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-01-10 09:47:03

carlahearne
Member
From: Milton Keynes, UK
Registered: 2011-11-13
Posts: 29
Website

[request] Link form to article?

Hi guys,

No idea if this is possible, but is there any way of linking a form to an article, much the same way as you’d link an image to an article?

Basically, I have a sidebar on my site, and I want the content to be different depending on the article. I know that I can do this with lots of if statements, but there must be an easier way?

Any help or ideas would be greatly appreciated.

Regards,

Carl

Offline

#2 2012-01-10 10:18:21

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: [request] Link form to article?

hi

wich kind of content on sidebar?

you can put content on a custom_field in article or in excerpt (if not used) on show that content on the sidebar. another solution should be putting sidebar content into articles and link to it by putting his id in a custom_field.

Regards

Offline

#3 2012-01-10 10:25:44

carlahearne
Member
From: Milton Keynes, UK
Registered: 2011-11-13
Posts: 29
Website

Re: [request] Link form to article?

Hi Dragondz,

The content in the sidebar could be an image, or it could be contact info, or any other bit of code..

A specific example; On my site I will have various articles about a particular location. When any of these articles are viewed, I’d like to show a sidebar with contact info etc for that location, and other specific information relating to the location. More than 1 article will relate to this sidebar, so I dont want to have to type it out every time etc…On other articles, I’d like to show a different sidebar etc.

I will look into the custom_field area though as this may be able to get me some of the way..

Offline

#4 2012-01-10 10:37:09

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: [request] Link form to article?

Hi

I think custom_field could do the trick, you can store on in text or html code or an id that link to another article wich contain the sidebar code, there is a lot of solutions just pick one that you are confortable with.

Cheers

Offline

#5 2012-01-10 10:44:56

carlahearne
Member
From: Milton Keynes, UK
Registered: 2011-11-13
Posts: 29
Website

Re: [request] Link form to article?

Hi Dragondz,

I just tried using custom_field and it’s perfect for the job.. I’m quite new to Textpattern so it’s difficult at first to see all of its potential; thanks for pointing out the perfect solution to my problem :)

Carl

Offline

#6 2012-01-10 11:43:04

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: [request] Link form to article?

Textpattern more you use it more you like it ;)

Offline

Board footer

Powered by FluxBB