More in this section

Forums / Developing with Sitefinity / Whats possible here?

Whats possible here?

7 posts, 0 answered
  1. steve portock
    steve portock avatar
    8 posts
    Registered:
    23 Apr 2010
    14 May 2010
    Link to this post
    I have to create a custom blog page where I would like to be able to create the post and add a video, audio mp3 file, both, or none and save everything at the same time. How would it be best to go about this? I did see that you could upload your videos and audio files to a library, and I might be able to add that to the blog post page, but you would have to two step that. The user would really like to one step this if possible, can anyone suggest anyway to accomplish this?

    Thanks in advance.

    Steve
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 May 2010
    Link to this post
    Hello steve portock,

    Do you want to add this functionality in the administration area of your client's Sitefinity website or you want to create a page which is available on the public end of the website? If you wish to do this in the back end of the application you can edit the control templates for creating and editing blog posts. More information here. Then you can take a look at the following help article explaining how to upload items in libraries through code. Then you have to add your logic to the control templates for creating or editing blog posts. Finally you can add new metafields to the blogs module to hold the ID of the linked video and in the controls for the public end you will get this ID and use the Libraries API to pull the file.

    Kind regards,
    Radoslav Georgiev
    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. steve portock
    steve portock avatar
    8 posts
    Registered:
    23 Apr 2010
    14 May 2010
    Link to this post
    Thanks for your reply, I did set up meta fields and wish to do this thru the admin section, public uploads are not allowed in this site. I will look thru the links you sent to see what I can do with this.

    Steve
  4. steve portock
    steve portock avatar
    8 posts
    Registered:
    23 Apr 2010
    14 May 2010
    Link to this post
    I set this up properly according to Gabe's video and notes, all my stuff persists properly in the blog edit entry screens but I can't get this to show in the single item view page, all it shows is the resource values, whats typed in for the resource value in the resx file, not what it should be pulling as a property. Am I missing anything? I have all the resources files set up correctly all the way thru, the webconfig values match, but I can't get my values to show. Anything else I can check? I did read up in the documentation on custom meta properties for images and other things besides the generic content stuff, and everything looks right, excepting some values in the libraries section of the webconfig. Is any of this affected by that?
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 May 2010
    Link to this post
    Hello steve portock,

    To show the values on a singe item view you should map the external template that is used by BlogPosts control - ListPageDetail.ascx. All external templates are available for downloading under your account >> Download section. In the template you should declare a control that has ID which is the same as the metakley name

    sample

    web.config - metaFields

    <add key="Libraries.Count" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue="0" />

    ListPageDetail.ascx template

    <div runat="server" id="modeHidden">
    <asp:PlaceHolder ID="trackbackScript" runat="server">
     
    </asp:PlaceHolder>
     
    <div class="sf_singlePost">
        <p class="sf_back">
           <asp:HyperLink ID="backToList1" Text="<%$Resources:GoBack %>" runat="server"></asp:HyperLink>
        </p>
        <h1 class="sf_postTitle">
            <asp:Literal ID="Title" runat="server"></asp:Literal>
        </h1>
       <p class="sf_postAuthor">
            <asp:HyperLink ID="postedBy" runat="server">
                <asp:Literal ID="Author" runat="server"></asp:Literal>
            </asp:HyperLink>
        </p>
     <p class="sf_count">
     <asp:Literal ID="Count" runat="server"></asp:Literal>
     </p>
        <p class="sf_postDate">
            <asp:Literal ID="Publication_Date" runat="server" Text="{0}" />
        </p>
        <asp:Panel ID="pnlContent" runat="server" CssClass="sf_postContent">
            <asp:Literal ID="content" runat="server"></asp:Literal>
        </asp:Panel>
         <p class="sf_postCategory">
            <asp:HyperLink ID="Category" runat="server" />
         </p>
         <p class="sf_postTags">
            <asp:Repeater ID="Tags" runat="server">
                <ItemTemplate>
                    <asp:HyperLink ID="tagLink" runat="server" />
                </ItemTemplate>
            </asp:Repeater>
        </p>
        <p class="sf_postBookmark">
          <asp:Repeater ID="Bookmarks" runat="server">
              <ItemTemplate>
                    <asp:HyperLink ID="BookmarkLink" runat="server">
                        <asp:Image ID="BookmarkImage" runat="server" />
                    </asp:HyperLink>
              </ItemTemplate
          </asp:Repeater
        </p>
    </div>

    Your meta key will be displayed if it is in one of the following types - ShortText,LongText, DateTime. For all other times you should override SetItemMetadata method of BlogPosts control.

    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.
  6. steve portock
    steve portock avatar
    8 posts
    Registered:
    23 Apr 2010
    15 May 2010
    Link to this post
    Ivan, I tried what you posted about, it still does not work. I also was doing this on a different template, but either way, it did not work on either template. I suspect when I invoke the dialog box that selects my file to save this and attach it to my blog post, its not linking this correctly. Can you offer up any insight as to what sf is doing during that, and how in general this all links together? I do realize that you have parent child id's in the objects, so I am suspecting that you just chain this together. Forgive my ignorance with this as I am new to this only coding on this the past couple of weeks, so I don't fully understand the architecture yet. But if you have any posts, articles, suggestions, that gets to the point on how this works quickly, I would be most grateful.
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 May 2010
    Link to this post
    Hi steve portock,

    Could you add some text into the HTML and see whether it will be displayed in when you open an item in details view? If this text is not there this means that the template has not been mapped. You could try to map it as described in this post Working with presentation modes.

    Best wishes,
    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.
Register for webinar
7 posts, 0 answered