Open chrisaldrich opened 6 years ago
Type reserved for now.
@chrisaldrich Why do you declare that the prime property is acquire-of if you don't use it in your template?
I think it was just an oversight. Since it's a completely experimental property, it's probably a moot issue anyway...
dshanske/indieweb-post-kinds ( GitHub)
Based on prior art and details in the IndieWeb Wiki for acquisitions.
I’m including some potential code below, though it will also require adding the appropriate icon and some meta data in a few places for the “Kinds” meta box as well as to the admin UI locations which are currently missing.
I’ve “cheated” a bit and defaulted to display the “wish” icon and thus some of its metadata, so the acquisition kind would need its own icon (the same shopping cart icon may be best) and some small meta data would need to be changed as well in the final.
For those who need to have this right away, the code below will “work” from a display standpoint.
Taxonomy Code template
Code snippet I’ve added to
indieweb-post-kinds/includes/class-kind-taxonomy.php
just under the section for the wish kind:Naturally the “true” flag for ‘show’ should be set to “false” until the code is feature complete.
A simple view for the acquisition post kind
Add the following code to the folder
indieweb-post-kinds/views/
in a file namedkind-acquisition.php
Future enhancements
Future additions/improvements to this kind could include potentially adding new data fields to indicate the “location purchased” as well as the “purchase price”, the “manufacturer” and maybe the “condition” with a dropdown for selecting options like brand new, like new, very good, good, acceptable, poor, and unspecified. These could be marked up with the
h-product
related microformats ofp-price
andp-brand
. These would then need to be tucked into the view as appropriate as well.(Originally published at: http://boffosocko.com/2018/03/02/support-for-acquisition-kind/)