21307 Posts in 5737 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 988 Views |
-
Siteconfig values inside a control doesn't work

20 June 2010 at 7:00am
As I am building a multilingual site, I decided to add some labels to siteconfig. As an example,
<% control Testimonials %>
<h3>$Title</h3>
<p>$Summary</p>
<% end_control %>
<a href="testimonials-page">$SiteConfig.LabelSeeAllTestimonials</a>
works perfectly. But,<% control Testimonials %>
<h3>$Title</h3>
<p>$Summary</p>
<a href="$Link">$SiteConfig.LabelReadMore</a>
<% end_control %>
doesn't work. I also tried<% control Testimonials %>
<h3>$Title</h3>
<p>$Summary</p>
<a href="$Link"><% control SiteConfig %>$LabelReadMore<% end_control %></a>
<% end_control %>
But anyway couldn't have success. Is there such a rule about SiteConfig? So that we can not use them inside controls? Or is there another trick?
I will be glad if anybody has an idea.
Thanksarda
-
Re: Siteconfig values inside a control doesn't work

20 June 2010 at 12:07pm
This is because SiteConfig is a property on the top level controller, not your object so it won't be in scope. Using $Top to go back to the top level should work..
<% control Top %>
$SiteConfig.Title
<% end_control %> -
Re: Siteconfig values inside a control doesn't work

21 June 2010 at 4:01am
Thank you very much Willr
you really saved my time.
| 988 Views | ||
|
Page:
1
|
Go to Top |


