Navigation Item Icon Property not applying merge syntax (Banzai 7.12)

  • 2
  • Problem
  • Updated 3 years ago
  • Solved
  • (Edited)
The Icon property of Navigation Items is not applying merge syntax.  Merge syntax is applied on icon properties in other components (e.g. table row action, page title button, etc.) and the navigation item does apply merge syntax on the label property.  

Applying merge syntax to icons was an enhancement in Spring '14 (https://community.skuidify.com/skuid/topics/skuid_should_process_merge_syntax_in_button_icons_to_all...) so it appears that it was overlooked with navigation items.

Steps to repro:
1) Create page using sample XML below
2) Preview page

Expected Result - cssclass attribute of nav item should include myicon-IDOFACCOUNT
Actual Result - cssclass attribute of nav item is "myicon-{{$Model.Account.data.0.Id}}"

** Sample page demonstrates merge syntax applied to icon property of page title.

Sample Page XML
<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Account" limit="1" query="true" createrowifnonefound="false" sobject="Account">
         <fields>
            <field id="Name"/>
            <field id="CreatedDate"/>
         </fields>
         <conditions>
            <condition type="param" enclosevalueinquotes="true" operator="=" field="Id" value="id"/>
         </conditions>
         <actions/>
      </model>
   </models>
   <components>
      <navigation uniqueid="sk-3ZTCRF-97">
         <navigationitems>
            <navigationitem label="{{$Model.Account.data.0.Name}}" icon="myicon-{{$Model.Account.data.0.Id}}">
               <actions>
                  <action type="redirect" window="self"/>
               </actions>
            </navigationitem>
         </navigationitems>
      </navigation>
      <pagetitle model="Account" uniqueid="sk-3ZT0iH-67">
         <maintitle>
            <template>{{Name}}</template>
         </maintitle>
         <subtitle>
            <template>{{Model.label}}</template>
         </subtitle>
         <actions>
            <action type="multi" label="{{Name}}" icon="myicon-{{Id}}"/>
         </actions>
      </pagetitle>
   </components>
   <resources>
      <labels/>
      <css/>
      <javascript/>
   </resources>
   <styles>
      <styleitem type="background" bgtype="none"/>
   </styles>
</skuidpage>
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb

Posted 3 years ago

  • 2
Photo of Andrew Duensing

Andrew Duensing, Employee

  • 740 Points 500 badge 2x thumb
Thanks for letting us know Barry. As per your bug report, this has been fixed. Additionally, for the sake of consistency, merge syntax support has been added to Tab Set icons as well.
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Awesome catch on tab icons!  Thanks for taking care of this!
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Tested and confirmed both Nav Item Icons and Tab icons support merge syntax as of Skuid 7.16.  Thank you!
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb
hehehe ... I was going to suggest both Conditional and merge syntax on Nav bar items. Here it is already.
https://community.skuidify.com/skuid/topics/conditional-rendering-of-navigation-items
Going to be sweet for a notification system.
(Edited)