rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: Moerten on March 10, 2007, 04:21:30 PM
-
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,
-
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%:
<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:
<script type="text/javascript">
document.write("%folder%".slice(1));
</script>