21307 Posts in 5737 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 596 Views |
-
$SiteConfig.Tagline not working within a loop

15 November 2010 at 11:03am
Hi,
I have added a company tagline which I can access from ss templates using $SiteConfig.Tagline. However I am having trouble when trying to access the tagline within a loop:
<% control Branches %>
<div class="office_location"><a name="$Name" id="$Name"></a>
<div class="office_details">
<h2>$Name CDP Office</h2>
<p>$Location $SiteConfig.Tagline</p>
<div class="office_map"> <a href="$GoogleMap" target="_blank"><img src="$LocationMapImage.LocationMap.URL" alt="View the $Name CDP office on Google maps" title="View the $Name CDP office on Google maps" width="$LocationMapImage.LocationMap.Width" height="$LocationMapImage.LocationMap.Height" /></a>
<p class="view_google_map"><a href="$GoogleMap" target="_blank" title="View the $Name CDP office on Google maps">View Google map directions »</a></p>
</div>
</div>
<div class="clear"> </div>
<% end_control %>I suspect the problem may be when I am accessing the branches it is unable to locate information outside of that. Is there any way I could make it globally acessiable.
Any help would be greatly appreciated. Cheers!
- Rich McNabb
-
Re: $SiteConfig.Tagline not working within a loop

15 November 2010 at 11:35am
yep, when in a loop you move to that "context". to access the top level context try...
<p>$Location $Top.SiteConfig.Tagline</p>
-
Re: $SiteConfig.Tagline not working within a loop

15 November 2010 at 12:10pm
Thanks swaiba that works great!!
I have one more question about accessing another page. I have 3 training pages:
TrainingIntro.php (introduction with a training schedule download)
> TrainingHolder.php (course subjects listed)
>TrainingPage.php (course overview)On TrainingIntro.php I can access the the pdf download by using $TrainingScheduleDownload.URL. However on TrainingPage.php I can't and am not sure how I would go about accessing something that is 2 levels above.
Would I need a function that gets the info from TrainingIntro or can I specify a page directly using something like (training-intro)$TrainingScheduleDownload.URL
Any help would be fantastic. Thanks again.
-
Re: $SiteConfig.Tagline not working within a loop

15 November 2010 at 1:31pm
Found it!!
$Page(Training).TrainingScheduleDownload.URL
| 596 Views | ||
|
Page:
1
|
Go to Top |


