ComboStrap UI - Pipeline
Table of Contents
1 - About
A pipeline is a element that contains a list of function (called a pipeline) that transforms successively a string.
Pipeline are used in template when you want to transform a variable such as a page title.
2 - Articles Related
3 - Syntax
<pipeline> value | function | function | ... </pipeline>
where:
4 - Functions
4.1 - Replace
replace is a function that will search a string and replace it.
Syntax:
replace($search, $replace)
For instance:
<pipeline> "Prefix - Title" | replace("Prefix - ","") </pipeline>
Output:
Title
4.2 - Rconcat
rconcat is a function that will concatenate a string to the right
Syntax:
rconcat($string)
For instance:
<pipeline> "Title" | rconcat("...") </pipeline>
Output:
Title...
4.3 - Head
head is a function that will take the fist N characters of a string
Syntax:
head($length)
For instance:
<pipeline> "Long Title that we want to cut" | head(10) | rconcat("...") </pipeline>
Output:
Long Title...