rejetto forum

Formatting of text in my template (cutting chars)

0 Members and 1 Guest are viewing this topic.

Offline draguls

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
Hi guys
I hope you can help me.

Lets say I have a picture with a date stamp in the filename:
"15.10.10.Image1.jpg"

Is it possible to only show the name? By cutting away the first 9 characters, something like:
%item-name%.substring(0, 9)

And it would print out:
"Image1.jpg"


Also if it's possible the other way around to print out:
"15.10.10"

Here it would of cause cut away all characters after the first 8.

Hope you understand what i mean :)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
sorry for the late reply.
yes it is possible, but it's better if you use HFS 2.3 instead of current official 2.2.
doing it by 2.2 is still possible by using javascript, that's up to the browser.
by 2.3 you can do it with commands on the server itself, like {.cut.}