Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#805 2011-02-15 13:13:33

Dimitri
Member
From: Johannesburg
Registered: 2010-10-31
Posts: 129

Re: glz_custom_fields

Wow nice, Dunno how I missed that. Will def have a look.

Apart from that, I really wanted to thank Gerhard once again for his precious work, that help set TXP as a better enviroment for client sites!

+1

Last edited by Dimitri (2011-02-15 13:21:06)


<txp:way_too_cool />

Offline

#806 2011-02-15 16:16:28

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: glz_custom_fields

Dimitri wrote:

Textareas doesnt go onto the sidebar, did you look below Body/Excerpt field,?

I ran into this the other day (I was moving lots of thing around with bot_wtc). I had not realized it either, but figure it was something odd like this.

Ok, so I’m feeling dense :)

I understand that is the case, but . . .

I am wondering why it ought to be the case. Flexibility in creation of CFs and flexibility of arranging the write tab would seem to suggest that we should be able to put any custom field anywhere we want on the page.

Just thinking aloud

Offline

#807 2011-02-15 16:20:28

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: glz_custom_fields

Apart from that, I really wanted to thank Gerhard once again for his precious work, that help set TXP as a better enviroment for client sites!

+1

Offline

#808 2011-02-15 17:09:47

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: glz_custom_fields

gerhard wrote:

What other content types would you want custom fields for? The script content type is super flexible, that would be the starting point for creating shared custom field types.

What I had in mind was allowing custom fields for images, files, links, and comments. I don’t have any particular use-cases for link and file custom fields, but I can definitely imagine the utility of custom fields for images and comments.

I don’t know what you have in mind, or what’s in store for TXP 5.x. If custom content-types are on the horizon, then perhaps custom fields for the other content types would be moot.

Offline

#809 2011-02-24 22:00:35

liamdempsey
Member
From: Philadelphia, PA
Registered: 2009-09-16
Posts: 10
Website

Re: glz_custom_fields

I am trying to sort the display of a custom article and had used sort=“custom_13” as the ‘13’ was the position of the custom field on the ‘Extensions’ tab within the admin side of the TXP-driven site. I’ve set up a custom field as a text input field and then used numbers (1,2,3,4 …) in each article to control the order in which articles are displayed.

I am guessing that the sort=“custom_13” is where I am going wrong, but I don’t know how else to call that particular custom field.

Any ideas?

Offline

#810 2011-02-25 09:25:35

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: glz_custom_fields

@liamdempsey

I think you need to specify if you want the sort in ascending or descending order too, so for example…

sort="custom_13 asc"

Also, depending on how many articles you plan to have in your list, you may want to put a leading zero on your numbers. I think currently your priorities would go 1,10,11,2,3 etc. With a leading zero it would be 01,02,03,10,11.

Last edited by philwareham (2011-02-25 09:25:44)

Offline

#811 2011-02-25 12:37:19

liamdempsey
Member
From: Philadelphia, PA
Registered: 2009-09-16
Posts: 10
Website

Re: glz_custom_fields

@philwareham

Thanks for the advice and the quick reply! I tried adding both the ‘asc’ and the leading zero … alas to no avail. It’s still not ordering the display of the custom articles in the hoped for way.

Offline

#812 2011-02-25 12:41:56

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: glz_custom_fields

@liamdempsey

That’s strange, I use a similar method for article priority sorting on one of my site, as follows…

<txp:article_custom form="your_form" sort="custom_13 asc" section="your_section" limit="999" />

Offline

#813 2011-02-25 12:58:34

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

Re: glz_custom_fields

For much easier sorting than by adding numbers in form fields I’d recommend stm_article_order which comes with drag’n‘drop.


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

Offline

#814 2011-02-25 13:02:41

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: glz_custom_fields

@liamdempsey

For simple sorts I also do what @philwareham does (just checked some source to be sure).

Can you see what the order is — for example if you re-save one of the Articles that is not found first, but with the Reset Time to now option ticked then re-load the page, does the order change? Another thing that’s tripped me up recently is the heavy caching in Chrome, if stuck I often now dump all cache from ano browser, Safari say, then try the weird thing there too.

Good luck, cheers, -Alan


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

#815 2011-02-25 16:52:03

liamdempsey
Member
From: Philadelphia, PA
Registered: 2009-09-16
Posts: 10
Website

Re: glz_custom_fields

@ philwareham –

Thanks for your continued efforts.

@ alanfluff –

I can’t quite figure out the display order. It’s not chronological, nor is it alphabetical. Per your recommendations, I cleared the cache and checked the site is different browsers. Still no luck.

Here’s the code I am using:

<txp:article_custom form=“news-listing” section=“news” on_home_page=“y” sort=“custom_13 asc” />

The ‘on_home_page’ allows me to limit which posts are displayed on the homepage of the site.

Thanks for your help. Much appreciated!

Offline

#816 2011-02-25 17:09:59

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: glz_custom_fields

Is it because, perhaps, article_custom defaults to only looking for 10 articles then it bails and the first 10 it looks for does not include the articles you expected? I may be wrong there, but quick test would be to add limit="999" to the article_custom tag.

Luck! Cheers, -Alan


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

Board footer

Powered by FluxBB