Hi all,

I'm having a problem with my template files. Using $front_page, it will print my full URL which is what I wanted.
So I will just place: href="<?php print $front_page ?>subfolder" and the page will print www.site.com/subfolder.

But when the page is translated, lets say to English (en), it won't print the backslash. So it will be printed as: www.site.com/subfolderen when it's supposed to be www.site.com/subfolder/en, with the backslash. If I add a backslash (/subfolder), then I will be having a double-backslash in non-translated pages.

All my other links that is generated by Menu and all other Modules is working correctly as expected. Only the <?php print $front_page ?> that I'm generating from .tpl.php file that isn't.

Any help on how should I do this correctly? Thank you so much. Help is much appreciated.

Comments

sovarn’s picture

maybe try using drupal's own link function?

http://api.drupal.org/api/function/l/6

sadist’s picture

thanks for the reply sovarn.

url('') will only print the same thing as $front_page. so, it will have the same problem (tried that). if i use the l(), that will print the whole href tag.

sadist’s picture

sovarn, your link actually gave me the idea to create taxonomy term, and use l(); for my template file. thanks! ;D

sovarn’s picture

glad to help :p