Item13828: Formatting issues with %RENDERMETADATA{...}%

pencil
Priority: Enhancement
Current State: New
Released In: n/a
Target Release:
Applies To: Extension
Component: MetaDataPlugin
Branches:
Reported By: LynnwoodBrown
Waiting For:
Last Change By: LynnwoodBrown
I've run into a couple of related issues with the %RENDERMETADATA{...}% macro when trying to define a custom (non-table) display of data:
  • Even if I set header and footer to empty and don't include the $actions format parameter in any of the field formats, a hidden metaDataActions span gets added after each meta data instance rendered. A bigger issue is that a closing div tag is also added after the span which breaks up the topic & page layout.
  • I tried adding an empty format parameter to make sure that the $action was not sneaking in somewhere, however this resulted in all of the per-field format parameters to be ignored.

-- LynnwoodBrown - 20 Oct 2015

Doing a little more testing, I understand better how %RENDERMETADATA{...}% formatting is intended to work:
  • The format parameter is intended to define layout for each METADATA record in it's entirety (all fields) so it makes sense that it overrides any per-field format parameters. Since this is a non-trivia difference between MetaDataPlugin syntax and the otherwise similar FlexFormPlugin syntax, it might be worth noting this explicitly in the docs.
  • If the $format parameter is not explicitly defined and the overall default tablular layout is rendered, then the <field>_format is somewhat different than the corresponding FlexFormPlugin parameter. E.g. in MetaDataPlugin, <field>_format much be defined such that it fits into (and doesn't break) the tablular layout. This should be noted in the docs.
  • If the format parameter is defined then the the $action block does not get rendered (unless of course it's included in the format definition). If the format parameter is not defined but all the individual fields have field-specific formats defined, then the $action block does get tagged on and can create page layout issues as described above. Perhaps clarification in the docs as described above would prevent a user from trying this.
  • A remaining issue that the $action block is specifically defined to work with the default table layout and does not work with other custom layouts, therefore making the $action formatting tag not really useful. In my case, I copied the rendered output of the $action block and then modified it to work with my layout. Not an ideal solution. It would be nice if the $action block was a bit more generically formatted, perhaps just with float-right div which appears when hovering over the individual record block. I'll change the task priority to "enhancement" request as I see the current implementation as "not ideal" if not an outright bug.

 

ItemTemplate edit

Summary Formatting issues with %RENDERMETADATA{...}%
ReportedBy LynnwoodBrown
Codebase 2.0.1, 1.1.9
SVN Range
AppliesTo Extension
Component MetaDataPlugin
Priority Enhancement
CurrentState New
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r2 - 21 Oct 2015, LynnwoodBrown
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy