6

The variable $siteroot contains a string that looks like:

http://www.example.nl/folder/

To get the part http://www.example.nl/ you use:

{$siteroot|substr:0:22}

But i want to skip this part and return /folder/

The length of the folder is unknown.

Maarten Kuilman
  • 481
  • 2
  • 6
  • 21

2 Answers2

9
{$siteroot|substr:22}

Should work

Eugene
  • 3,280
  • 21
  • 17
1
{assign var="bar_at" value=$siteroot|strpos:"nl/"}
{$siteroot|substr:$bar_at+2}
Sibu
  • 4,609
  • 2
  • 26
  • 38