Changes for page Computed Pseudofield

Last modified by Sergei Kulagin on 2022/11/18

<
From version < 8.1 >
edited by Robert
on 2018/03/11
To version < 9.1 >
edited by Robert
on 2018/03/11
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -78,5 +78,18 @@
78 78  
79 79  But what happens if the source field is empty?
80 80  
81 +[[image:image.png||height="93" width="729"]]
81 81  
83 +This is not good, so let's prepare for source being empty:
84 +
85 +{{code}}
86 +{{velocity}}
87 +#set($source=$object.getValue('source'))
88 +#if($source.length()>=2)
89 +$source.substring(0,2)
90 +#end
91 +{{/velocity}}
92 +{{/code}}
93 +
94 +
82 82  

Get Connected