Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Replacement of LeftandMain::versionFromVersionFile in SS3


Go to End


3 Posts   456 Views

Avatar
Praveen

Community Member, 49 Posts

9 October 2014 at 5:36pm

How to get the CMS version in Page Controller?

LeftandMain::versionFromVersionFile method not found .

Avatar
kinglozzer

Community Member, 187 Posts

9 October 2014 at 9:08pm

singleton('LeftAndMain')->CMSVersion()

This will return a string similar to "Framework: 3.1.6, CMS: 3.1.6".

If you need more specific information, have a look at how the method finds out the current version: http://api.silverstripe.org/3.1/source-class-LeftAndMain.html#1504-1571

Loz

Avatar
Praveen

Community Member, 49 Posts

9 October 2014 at 9:46pm

Thanks Loz,