Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1154

not possible to do if then else on templates

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.0.1
    • ZHTML

      curentlly i have to do workaround

      <div children="@load(model.dummy) @template(model.visible?'tabs':'text')" >
      	<template name="text">
      		<label value="Nothing selected" />
      	</template>
              <template name="tabs">
      		<label value="Something" />
      
      ......
              </template>
      </div>
      

      and have to have a model property dummy (one element list). it would be nice to have the same syntax without the @load(model.dummy) so the code would look like

      <div children="@template(model.visible?'tabs':'text')" >
      	<template name="text">
      		<label value="Nothing selected" />
      	</template>
              <template name="tabs">
      		<label value="Something" />
      
      ......
              </template>
      </div>
      

            Unassigned Unassigned
            abalwierz abalwierz
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: