Wählen Sie Ihre Sprache:

<we:ifNotPosition>

Since version: 3.1.0.0 | Requires endtag: yes

Description

The tag we:ifNotPosition allows you to define an action which will NOT be executed at a certain position of blocks (<we:block>), listviews (<we:listview>), linklists (<we:linklist>) or listdirs (<we:listdir>). The parameter "position" can handle versatile values to control the first, last, all even, all odd or a specific position (1,2,3, …). Is "type" = "block" or "linklist" it is necessary to specify the name ("reference") of the related block/linklist.

Attributes

type

Default value: - | since version: - | required: yes

Set this attribute to the type of tag to be examined.

Allowed values:

  • block
  • linklist
  • listdir
  • listview

position

Default value: - | since version: - | required: yes

Set this attribute to the position(s) to be examined.

Allowed values:

  • first
  • last
  • odd
  • even

reference

Default value: - | since version: - | required: no

Set this attribute to the name of the block (<we:block>) or linklist (<we:linklist>) to be examined.


Syntax

<we:ifNotPosition type="block|linklist|listdir|listview" position="first|last|odd|even" [reference="attribute"]> ... </we:ifNotPosition>

Examples

Example #1 - block

<we:block name="MyBlock">
  <we:ifNotPosition type="block" position="first" reference="MyBlock">
    not the first entry
  </we:ifNotPosition>
</we:block>

Example #2 - block

<we:block name="MyBlock">
  <we:ifNotPosition type="block" position="1" reference="MyBlock">
    not the first entry
  </we:ifNotPosition>
</we:block>

Example #3 - block

<we:block name="MyBlock">
  <we:ifNotPosition type="block" position="1,3" reference="MyBlock">
    not the first or third entry
  </we:ifNotPosition>
</we:block>

Example #4 - block

<we:block name="MyBlock">
  <we:ifNotPosition type="block" position="last" reference="MyBlock">
    not the last entry
  </we:ifNotPosition>
</we:block>

Example #5 - listview

<we:listview name="MyListview">
  <we:repeat>
    <we:ifNotPosition type="listview" position="first">
      not the first entry
    </we:ifNotPosition>
  </we:repeat>
</we:listview>

Example #6 - listview

<we:listview name="MyListview">
  <we:repeat>
    <we:ifNotPosition type="listview" position="1">
      not the first entry
    </we:ifNotPosition>
  </we:repeat>
</we:listview>

Example #7 - listview

<we:listview name="MyListview">
  <we:repeat>
    <we:ifNotPosition type="listview" position="1,3">
      not the first or third entry
    </we:ifNotPosition>
  </we:repeat>
</we:listview>

Example #8 - listview

<we:listview name="MyListview">
  <we:repeat>
    <we:ifNotPosition type="listview" position="last">
      not the last entry
    </we:ifNotPosition>
  </we:repeat>
</we:listview>