Keyword

REQUEST: K2 API Enhancements

  • harikaram
  • harikaram's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 7 months ago #94580 by harikaram
REQUEST: K2 API Enhancements was created by harikaram
In developing template overrides for my websites, I'm having to do a lot of PHP coding in order to get data that one might expect to be available, for example, getting the item tags and author information in the generic templates.  Below are a few addition to the api of the item object (which is currently just is stdClass in the "item" template) that would be very useful...


Tags, extrafields, and author info fully set for all views
->getExtraFieldByName('My Extra Field') returning the object or perhaps just the value
$item->extraFieldGroupName
Having the default image data set by the view, consistently at the same place in the code flow for each view (currently its different for categories, items, generic, ...) AND prior to the onK2BeforeDisplay hook
Having it be a K2ItemModel or Table with an api rather than just a stdClass. 
More event hooks for categories paralleling those for items, especially w.r.t. the admin side

In the meantime, I'll attach a static class which I use in my template overrides to make working around these shortcomings a bit easier...

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum