Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Template Questions
SilverStripe Forums » Template Questions » access user parameter
|
Page:
1
|
Go to End | |
| Author | Topic: access user parameter | 270 Views |
-
access user parameter

26 June 2009 at 11:31am Last edited: 26 June 2009 11:32am
Hi again,
I added this to my page.php
and now I can use <% MyLang or $MyLang in my templates. Don't ask why, I need it in my templates^^function MyLang() {
return Translatable::current_lang();
}
But now, there's a new problem:MyLang isn't working anymore, I think cause of the <% control %>. But why? MyLang is in Page_Controller in page.php, the template and the control both inherits from Page_Controller (xxx extends Page_Controller). Why is MyLang not available? There's no error, it just seems to be empty, also<% control LatestPost(2) %><% MyLang ...
won't return "en".return "en" . Translatable::current_lang();
Other possibility, can I use hierarchies in <% %>? Something like
<% Level(1).MyLang %> // <<<<< this will throw an error
I've given up now, don't have any idea... Also _t(...) doesn't work, it always retruns default string.
| 270 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: Punch Rockgroin
Welcome to our latest member: Bud

