rejetto forum

template folder question

0 Members and 1 Guest are viewing this topic.

Offline Moerten

  • Occasional poster
  • *
    • Posts: 8
    • View Profile
Hi,

I`m working on my template. But my question is: if i use %folder% and i see in from web it says: /someting/otherthing, what i want my %folder% without the first "/" how can i do that?

Thanks,
Moerten 2007, Just another HFS template, like it or not!


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
Hi,

I`m working on my template. But my question is: if i use %folder% and i see in from web it says: /someting/otherthing, what i want my %folder% without the first "/" how can i do that?

Thanks,

In your example, %folder% would show /something/otherthing/.

If you want to get rid of both the first and the last slash, use the following code instead of %folder%:

Code: [Select]
<script type="text/javascript">
document.write("%folder%".slice(1, -1));
</script>

Or if you just want to get rid of the first slash, simply use this one:
Code: [Select]
<script type="text/javascript">
document.write("%folder%".slice(1));
</script>