Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-24 16:34:27

Soutpiel
New Member
From: London
Registered: 2009-07-28
Posts: 7

Setting cookies / variables so all articles filter by user preferences

I’m having trouble finding solutions to this since just describing the problem is proving tricky. Briefly, here’s what I want to do:

I want to build a website with Txp that filters all it’s content according to a user’s location and specific interests. This would be easy enough to do on a single page using a plugin like rss_unlimited_categories, but I want the user’s chosen categories to be remembered so that only the chosen content is shown as they continue to browse the site.

For example: there may be a “Choose your location and interests” page with check boxes in an HTML form. The form could send the chosen values on to Txp variables or perhaps browser cookies. Once this is set, the txp:custom_article tag is set to only display articles with those chosen values/categories. I’ve tried setting this up using a combination of smd_each (to iterate through variables/cookies), chs_cookie (to set and retrieve cookies), and rss_unlimited_categories (to extend the number of categories beyond the default in Txp). However, after 2 solid days of tinkering, I just can’t get the plugins to talk to each other properly. I’m tearing my hair out!

Has anyone else done anything like this — any suggestions how I might go about it? Are there any other plugins that might help?

All suggestions greatly appreciated!

Offline

Board footer

Powered by FluxBB