21286 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 191 Views |
-
Determine Subsite in Page

25 April 2012 at 7:15pm
Hey guys,
So, I'm using a controller to provide services to some Ajax based pages. I'm also using subsites. What I'd like to do is to allow each site to know what subsite its in, so it can make some adjustments.
So, question; is there a way, within a controller, to determine what subsite is currently being served?
Thanks in advance,
Lee -
Re: Determine Subsite in Page

26 April 2012 at 9:53am
Figured it out. For those of you who have the same requirement, just do:-
Subsite::currentSubsite();
Then, you can, perhaps, differentiate using
$site = Subsite::currentSubsite();
$title = $site->Title;Lee
| 191 Views | ||
|
Page:
1
|
Go to Top |

