Hi folks,
I'm a Wordpress user, and I also use a few plugins that make use of custom fields, which are arbitrary key,value pairs that can be associated with posts.
I've implemented support for these into the blogging bundle. I've attached both a diff and a zip of the entire modified bundle.
It adds a 'Custom' header item, which has the format:
Custom: field_name (field_id) = field_value
Where field_id is an optional numeric value, and retrieved when fetching posts.
Cheers,
Michael
On 28 Nov 2008, at 04:33, Michael Tyson wrote:
[...] format: Custom: field_name (field_id) = field_value
Where field_id is an optional numeric value, and retrieved when fetching posts.
Is this specific to WP, i.e. allowing field retrievel via numeric ids?
I think I would prefer a syntax more like:
x-«field»: «value»
But that does not allow for numeric value, but I am sort of assuming all custom fields should just be passed to server as key/value pairs!?!
I'm not entirely sure if it's WP-specific - it's certainly not part of the MT spec, from what I understand.
WP provides for multiple values for the one key, which is why the numeric ids are there; if no ID is present, WP will create a new field, regardless of prior fields with the same key.
I like your idea of using the x- prefix; perhaps a syntax like:
x-«field»-«identifier»: «value»
..Would provide for the numeric ID? Thoughts?
On 28/11/2008, at 11:03 PM, Allan Odgaard wrote:
On 28 Nov 2008, at 04:33, Michael Tyson wrote:
[...] format: Custom: field_name (field_id) = field_value
Where field_id is an optional numeric value, and retrieved when fetching posts.
Is this specific to WP, i.e. allowing field retrievel via numeric ids?
I think I would prefer a syntax more like:
x-«field»: «value»
But that does not allow for numeric value, but I am sort of assuming all custom fields should just be passed to server as key/value pairs!?!
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 28 Nov 2008, at 23:58, Michael Tyson wrote:
I'm not entirely sure if it's WP-specific - it's certainly not part of the MT spec, from what I understand.
WP provides for multiple values for the one key, which is why the numeric ids are there; if no ID is present, WP will create a new field, regardless of prior fields with the same key.
I like your idea of using the x- prefix; perhaps a syntax like:
x-«field»-«identifier»: «value»
..Would provide for the numeric ID? Thoughts?
That sounds good, but I still do not understand the numeric identifier.
It sounds like this is the alternative to provide an array as value?
So instead of:
x-tags: ( foo, bar )
I would do:
x-tags-1: foo x-tags-2: bar
Is this correct? Can you give an example of keys where you supply multiple values?