Getting the Project/App Name Programatically

Posted by Community Admin on 03-Aug-2018 19:25

Getting the Project/App Name Programatically

All Replies

Posted by Community Admin on 09-Dec-2010 00:00

Hi,

       How do I programtically get the current project name in SiteFinity ?

Thanks in advance,
Jon

Posted by Community Admin on 09-Dec-2010 00:00

Hi Jon,

You can do this from the configuration

var name = Telerik.Sitefinity.Configuration.Config.Get<ProjectConfig>().ProjectName;

All the best,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 10-Dec-2010 00:00

thks ..
jon

Posted by Community Admin on 04-Apr-2012 00:00

Any chance we can get the project name on the client side?

Posted by Community Admin on 04-Apr-2012 00:00

Any chance we can get the project name on the client side?

Posted by Community Admin on 04-Apr-2012 00:00

You can do that easy enough in your masterpage, just dump it into an <asp:HiddenField somewhere on your page

I'd rather they didn't automatically do this :)

Posted by Community Admin on 05-Apr-2012 00:00

Hi,

You need to send it from the server to the client reading the configuration as shown above. I don't think that we store it somewhere on the client.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 06-Mar-2013 00:00

Ivan,

 

I just tried this in the code behind of my master page and I'm getting : The type or namespace name 'ProjectConfig' could not be found (are you missing a using directive or an assembly reference?)

Any thoughts?

Posted by Community Admin on 11-Mar-2013 00:00

Hello,

 You need to add the following reference:

using Telerik.Sitefinity.Project.Configuration;

I just did a quick test and the project name is being retrieved correctly.

Kind regards,
Atanas Valchev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed