BlogEntries
The BlogEntries server control displays several blog posts or a user’s Journal (personal blog) on a Web form. You can change this server control's appearance without changing the other blog controls. The following example shows a BlogEntries server control.
To use this server control to dynamically display a blog’s entries, set the following properties:
DynamicParameter
. Set this property to the parameter name used to pass a blog ID to the QueryString. The default is blogid.BlogPostParameter
. Set this property to the parameter name used to pass a blog post’s ID to the QueryString. The default is id.
To use this server control to dynamically display a user’s Journal, set the following properties:
DynamicUserParameter
. Set this property to the parameter name used to pass a user’s ID to the QueryString.BlogPostParameter
. Set this property to the parameter name used to pass a blog post’s ID to the QueryString. The default is id.
Inserting the BlogEntries server control onto a page
Prerequisite
You must have installed the server controls. See Installing server controls into Visual Studio Toolbox.
- In Visual Studio, choose View > Toolbox.
- Click the Ektron server control tab to display the server controls.
- Drag the BlogEntries server control and drop it into the desired location on the page.
NOTE: You also can place the cursor on the page where you want the server control, then double click the server control that you want.
<CMS:BlogEntries ID="BlogEntries1" runat="server" />
- Click on
BlogEntries
in the code to display and modify the control’s properties using the Properties window of Visual Studio. The page is updated as you modify the property values.
BlogEntries properties
The following are Ektron-specific server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified. properties. For information about native .NET properties such as font, height, width and border style, use Visual Studio® help.
- BlogID (Long)
The ID of the blog in Ektron from which blog entries are displayed; for example, 41. This is the default ID that is used when a blog ID is not passed dynamically to the QueryString. To pass a blog ID dynamically, set the
DynamicParameter
property. If you don’t know the ID of the blog, use the CMS Explorer to browse to it.See also: Browsing your Ektron site using CMS Explorer - BlogPostParameter (String)
Set this property to the parameter name used to pass a blog post’s ID to the QueryString. The default is id. When a parameter is defined, this server control passes the blog post’s ID as a URL parameter. If you do not set this parameter to id, you will not be forwarded to the blog post’s page when you click on any links in the post. The default setting is id.
- Blank. The list of blog posts is static. The links in the blog posts are inactive.
- id. The ID of the blog post is passed to the URL as a parameter.
- None use default. The list of blog posts is static. The links in the blog posts are inactive.
- BlogStartDateRange (String)
Set the date range of the Blogs to show. For example, if you want to display blogs for only the past 3 months, set this value to Quarterly.
- None. No start date range
- Monthly. Current month
- Quarterly. Past 3 months
- BiYearly. Past 6 months
- Yearly. Past 12 months
- CacheInterval (Double)
The number of seconds that a server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified.’s data is cached. The default is 0 (zero). For example, if you want to cache the data for 5 minutes, set to 300. See also: Caching with server controls.
- DateToStart (DateTime)
The date of the last blog entries you want to appear. For example, if you want to display blog entries for January 1, 2012 and before, enter 1/1/2012. Click the drop-down box to access a calendar.
- DefaultUserID (Long)
The ID of the user who owns a Journal from which to display journal entries. To display journal entries not associated with a user, leave this property set to 0 (zero) and enter the blog's ID in the
BlogID
property.WARNING! If you define a DefaultUserID, it overrides the BlogID property.
- DisplayXslt (String)
If desired, enter a relative or absolute path to an Xslt that determines the display of the page.
WARNING! Files stored in the
siteroot\Workarea
folder are overwritten (or deleted) when you upgrade Ektron. To avoid problems, copy the default file to a folder outside thesiteroot\workarea
folder then edit it. If there is no default file, create the file outside thesiteroot\workarea
folder. Next, in this property, enter the path to that file relative to the site root folder. - DoInitFill (Boolean)
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
- DynamicParameter (String)
Gets or sets the QueryString parameter to read a Blog ID dynamically. Set to “None. Use Default” if you want to always display the default blog. The default is blogid.
NOTE: If an ID for this property is passed on the QueryString and a an ID for the DynamicUserParameter property is passed the control displays blog entries for a user.
- DynamicUserParameter (String)
Gets or sets the QueryString parameter to read a User ID dynamically. Set to Use Default if you wish to always display the default user's blog (static.)
NOTE: If an ID for this property is passed on the QueryString and a an ID for the DynamicUserParameter property is passed the control displays blog entries for a user.
- Hide (Boolean)
Hides or displays the output of the control in design time and run time.
- True. Hide the control output.
- False. Display the control output.
- Language (Integer)
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
- MaxResults (Integer)
Set the maximum number of posts to display. The default is -3.
- 0 (zero). No limit
- -1. All posts for the current day
- -2. All posts for the current month
- -3. The # of Post Visible Workarea setting
- ShowHeader (Boolean)
Shows the title and tagline when set to True. The default is True.
- True. Show title and tagline.
- False. Do not show header and tagline.
- True. Show title and tagline.
- SuppressWrapperTags (Boolean)
Suppresses the output of the span/div tags around the control.
- True. Suppress wrap tags.
- False (default). Allow wrap tags.
- WrapTag (String)
Lets a developer specify a server control’s tag.
- Span (default). Designate an inline portion of an HTML document as a span element.
- Div. Apply attributes to a block of code.
- Custom. Lets you use a custom tag.