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

Forums / Developing with Sitefinity / Unkown Placeholder

Unkown Placeholder

3 posts, 0 answered
  1. DPC David
    DPC David avatar
    26 posts
    Registered:
    28 Dec 2009
    15 Feb 2010
    Link to this post
    Hi

    im very sure my question is about asp.net/Sitefinity basics but i can't find any information about this syntax ("{#ID#}"):
            /// <summary>
            /// Gets the item view URL.
            /// </summary>
            /// <value>The item view URL.</value>
            public override string ItemViewUrl
            {
                get
                {
                    return CreateHostViewCommand<ArticlePreviewView>("{#ID#}");
                }
            }
    can anyone help me in where i can find more information about this placeholder? I thought it must be an Metadata in web.config file but there is no entry?

    Regards David
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    15 Feb 2010
    Link to this post
    Hi David Pereira Vaz,

    1. You need to rewrite your property and check for null

    public override string ItemViewUrl
    {
        get
        {
            if (this.itemViewUrl == null)
                this.itemViewUrl = CreateHostViewCommand<MyViewView>("{#ID#}");
            return this.itemViewUrl;
        }
    }

    the  ID is a property of the content item. You use CreateHostViewCommand to navigate among the views. So in the code above you navigate to MyHostView and add the item ID as QueryString parameter.

    domain.com/EmptyProject/Sitefinity/Admin/Modules.aspx?module=Blogs&route=BlogsControlPanel.PostsView.PostPreviewView&ParentId=af92e552-cde2-4832-b7c2-24219d5e92de&Param=f49f7b19-eab7-401e-88be-85af0a75a321


    Greetings,
    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. DPC David
    DPC David avatar
    26 posts
    Registered:
    28 Dec 2009
    15 Feb 2010
    Link to this post
    Hi

    thanks a lot for the fast reply, i adopt an existing Sitefinity-Installation and just have started with Sitefinity. So most of the code existed already even the bug's.

    Regrads David
Register for webinar
3 posts, 0 answered