Knowledge is power. We love to share it.

News related to Mono products, services and latest developments in our community.

kpeulic

MonoX news category management

03/27/2012Categories: MonoX
Introduction

News category administration allows users to create and maintain a hierarchy of news categories. Before you add your first news article you should add at least one news category.

To manage the news categories you should choose "News -> News Categories" from the menu in the MonoX  administration area.

Basics

Every news category has a list of attributes that can be viewed and changed in the right pane. Left pane displays the structure of your news hierarchy; standard drag and drop actions can be used to change this structure.

How to add a news category

Select the "Root" node at left pane and click on the "Add" button at the bottom of the right pane.

Now you need to fill in the attribute fields for your category:

Title
This field is mandatory. Enter your title into this field.

Category title cab be used for news filtering in news modules. Here is how you can set the news filter in the main news module:

1. Go to the page holding the main news module and click on the "Menu" at the right side of module and choose the “Edit the Web part properties” icon from the list of options.

 image


2. Go to the top of the page and click on the "Change the look and functionality of this page".




3. Now you need to click on the "Web part properties" tab to open the properties of the current module.




4. Find the "Category filter for news module" and you will see all news category titles. Select the category which you want to use to filter the news in this module.




5. The above selection will give you only the news from sthe elected category, but not from their subcategories. If want to see the news and their subcategories you need to check the option "Show news from category sub categories".




6. At the end you need to confirm the settings by clicking on the "Ok" or "Apply" button.




Name

This field is mandatory



Category name can be used for news filtering in your code. Here is the example of a simple SQL query that can be used with this property:

SELECT NewsCategoryId  FROM [Monox].[dbo].[NewsCategoryLocalization]
  WHERE [Name] = 'my-first-category'

The "NewsCategoryId" you retrieve from the query above can be used with the "CategoryFilterId" property. Here is the example for the markup:

<MonoX:News ID="ctlNews" runat="server" ShowRating="true" ReadMorePageUrl="/MonoX/Pages/NewsDetails.aspx" PagerPageSize="4" CategoryFilterId="<%= NewsCategoryId %>"></MonoX:News>

And here is the example for the codebehind:

ctlNews.CategoryFilterId = NewsCategoryId;

Category image

This field is optional.



Here you can specify the image for the category which can be visible in the news module and in the news menu. Here is an example:



Published
This is an optional field.
Here you can choose if the news articles from this category are publicly visible.



Description
This is an optional field.



Short description of a category can be visible in the news item as a tip for the category.



Template name
This is an optional field.
Here you can choose the layout template for the list of the news articles in this category.



The above choice overrides the template specified in the main news module properties in the front end.



Here is an example how the front end part looks when each of the three default templates is selected.


Template name (For full content preview)

This is an optional field.
Here you choose the layout template for the full content preview of the news article.

The above choice overrides the template specified in the single news module.   



Here is an example with 2 different layout templates for the single news module.


Category view roles

This is an optional field.
Here you can specify user roles which can view the news articles from this category at the front end. Note: if no roles are selected, all users (visitors) will be able to see the category content.



Category edit roles
This is an optional field.
Here you can specify user roles which can add/edit/delete the news articles from this category at the news management page in the Monox portal administration area. By default only "NewsEditors" and "Administrators" can manage the category content.

How to add the news subcategory

You can add the news subcategory to the existing category by choosing the category from the left pane, clicking on the Add button and filling in the form. You can add as many subcategory levels as you want.



The quickest way to access the news category administration page is to click on the "Edit categories" on the news module at the front end.



Alternatively, you can click on the menu icon at the right side of the news module and then choose the "Edit Categories" option.

 image
This content has not been rated yet.