+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Getting the Project/App Name Programatically

Getting the Project/App Name Programatically

9 posts, 0 answered
  1. Jon
    Jon avatar
    41 posts
    Registered:
    20 Oct 2010
    09 Dec 2010
    Link to this post
    Hi,

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

    Thanks in advance,
    Jon
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Dec 2010
    Link to this post
    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
  3. Jon
    Jon avatar
    41 posts
    Registered:
    20 Oct 2010
    10 Dec 2010
    Link to this post
    thks ..
    jon
  4. James
    James avatar
    2 posts
    Registered:
    25 Aug 2011
    04 Apr 2012
    Link to this post
    Any chance we can get the project name on the client side?
  5. James
    James avatar
    2 posts
    Registered:
    25 Aug 2011
    04 Apr 2012
    Link to this post
    Any chance we can get the project name on the client side?
  6. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    04 Apr 2012
    Link to this post
    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 :)
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Apr 2012
    Link to this post
    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
  8. Mathieu
    Mathieu avatar
    13 posts
    Registered:
    21 Mar 2012
    06 Mar 2013 in reply to Ivan Dimitrov
    Link to this post

    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?

  9. Atanas Valchev
    Atanas Valchev avatar
    414 posts
    Registered:
    04 Jan 2016
    11 Mar 2013
    Link to this post
    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
9 posts, 0 answered