Keep part of a list
Splits the value on a separator and keeps the first, the last, the part at a position, or a range of parts.
Group: Text
When to use it
Section titled “When to use it”The last level of a category path, the first image of a list of images, the first two levels of a category tree.
Settings
Section titled “Settings”- Separator: the character between the parts, for example
>,,or|. Spaces around it are ignored, so>splitsAuto > Enginestoo. - Keep:
- The first part or The last part.
- The part at a position: 1 is the first part, -1 the last, -2 the one before.
- Parts from … to …: for example from 1 to 2 for the first two levels. Leave To empty to keep everything up to the end.
- Join kept parts with (optional): placed between the kept parts. By default, the separator as you typed it: type
>to get spaces around it.
Example
Section titled “Example”| Before | After |
|---|---|
Auto > Engines > 540 (separator >, the last part) |
540 |
a.jpg,b.jpg,c.jpg (separator ,, the first part) |
a.jpg |
Auto>Engines>540 (separator >, parts from 1 to 2) |
Auto > Engines |
Good to know
Section titled “Good to know”- Each part is trimmed, and empty parts (
a,,b) are skipped. - A part that does not exist, such as the third part of a two-part value, gives an empty value.
- A value without the separator is one part: the first and the last part are the whole value.