Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2015-09-07 19:00:19

gfdesign
Member
From: Argentina
Registered: 2009-04-20
Posts: 401

Re: [howto] Front End Search: Filter Articles With Drop-Down and Multi-Select Menu

Hello People. First of all thanks for this incredible tutorial and plugins. I followed it and works as I expected.

I just wondered if there is a workaround to enter new default values to custom fields in order to the user doesn’t have to access to Custom fields on extension tabs. Also, I’d like the search form retrieves automatically all possible values and not to have modify this form every time there are a new values.

I mean, let’s suppose we add an new value to ‘color’ field or a new feature. I wouldn’t like to have modify the search box every time these default values change. I thought that it could be through using the categories as an alternative way to enter new values and to use the parent category as variable’s name. For example, to create the “color” parent category and its child categories as values (red, blue, white, etc).

I guess we would have to depend on an script to transform the values from categories into values for custom fields and set up what kind of input tag we want for them (checkbox, radiobuttons, select, etc).

Does it have sense this idea I propose?
Best regards
Fernando

Offline

#26 2015-09-07 19:50:34

etc
Developer
Registered: 2010-11-11
Posts: 5,218
Website GitHub

Re: [howto] Front End Search: Filter Articles With Drop-Down and Multi-Select Menu

Sorry, I don’t remember all the details of this tip, but “automatic” lists should be fairly easy to construct. Say, you store colors in custom_11, then this will give you all available options:

<txp:etc_query data="SELECT value FROM custom_fields WHERE name='custom_11_set'">
<option <txp:if_variable name="Color" value="{value?}">selected</txp:if_variable> value="{value?}">{value?}</option>
</txp:etc_query>

Offline

#27 2015-09-08 18:20:32

gfdesign
Member
From: Argentina
Registered: 2009-04-20
Posts: 401

Re: [howto] Front End Search: Filter Articles With Drop-Down and Multi-Select Menu

Hey Oleg.
Just would be missing the way how our client would load new values without accessing into Custom Field tabs extension. I suppose it is not so simple in TXP. For example in Wordpress, each ‘Custom Post Type’ (in the example of this tutorial would be ‘vehicles’) can have its own page of categories (taxonomy) in the Admin and it’s ideal for a better UX.
Anyway, thanks a lot for this tip. I’ll try it later.
Best regards

P/d: I am subscriber to this topic but I am not receiving notifications. :/

Offline

#28 2015-09-08 20:04:55

etc
Developer
Registered: 2010-11-11
Posts: 5,218
Website GitHub

Re: [howto] Front End Search: Filter Articles With Drop-Down and Multi-Select Menu

gfdesign wrote #294546:

Hey Oleg.
Just would be missing the way how our client would load new values without accessing into Custom Field tabs extension. I suppose it is not so simple in TXP. For example in Wordpress, each ‘Custom Post Type’ (in the example of this tutorial would be ‘vehicles’) can have its own page of categories (taxonomy) in the Admin and it’s ideal for a better UX.

Hola Fernando,

I’m not sure transforming categories into cf is natural. From UX pow, what if we had some “Edit” button aside each cf on “Write” tab, which would open a modal window à la glz_cf? That could be doable, but would probably not survive to Stef’s upcoming cf paradise.

P/d: I am subscriber to this topic but I am not receiving notifications. :/

If I remember it well, that has something to do with language settings of your old account, was it Spanish?

Offline

#29 2015-09-08 20:48:58

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,310

Re: [howto] Front End Search: Filter Articles With Drop-Down and Multi-Select Menu

etc wrote #294548:

If I remember it well, that has something to do with language settings of your old account […]

Yup, you’re right. I hoped the issue was remedied forever. Fernado, can you please add a post with your problem to the topic linked here?

And did you receive an email from this topic? Please report to Robert about the outcome of that test, too. I.e. whether it’s related to this topic here or whether your problem is a general one.

Last edited by uli (2015-09-08 20:59:20)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#30 2015-09-08 21:10:15

gfdesign
Member
From: Argentina
Registered: 2009-04-20
Posts: 401

Re: [howto] Front End Search: Filter Articles With Drop-Down and Multi-Select Menu

Ok. Oleg.
Yes, I do understand what you mean. You know I am not a programming guy, but I understand a little about the TXP logic. Maybe, I am suggesting some incompatibles ideas but I’d like they are consider for future versions of Textpattern.
Many thanks for replying.
Best regards :)

Hi Uli
Unfortunately I haven’t received any message from that topic neither.
Meanwhile, I solved it using RSS subscription in this topic.
I’ll post a message in the topic you say.
Thanks for your concerns.

Offline

Board footer

Powered by FluxBB