More in this section

Forums / Developing with Sitefinity / New Module - Custamization

New Module - Custamization

6 posts, 0 answered
  1. v
    v avatar
    27 posts
    Registered:
    12 Aug 2009
    10 Nov 2009
    Link to this post
    Hi,
    sitefinity 3.7 version i'm using i'm custamizing the (News Module) All news items.
    when i drag and drop my usercontrol in edit part i need to select the news items based on the category.
    how can i show the category on the edit part., how will i read the selected item on the .cs page level

    i'm pulling the data like the below steps

    NewsManager objnewsManager = new NewsManager("News");
                IMetaSearchInfo[] filters = new IMetaSearchInfo[3];
                filters[0] = new MetaSearchInfo(MetaValueTypes.DateTime, "Expiration_Date", DateTime.Now, SearchCondition.GreaterOrEqual);
                filters[1] = new MetaSearchInfo(MetaValueTypes.ShortText, "Category", ConfigurationManager.AppSettings["xxcategory"].ToString()); - Instead of reading from the appsettings i should read the value in the drop downlist category(it may have more than 10 category)  find the attachemnt
                filters[2] = new MetaSearchInfo(MetaValueTypes.Boolean, "Active", true);           
                IList lstListOfNewsItems = objnewsManager.Content.GetContent("Publication_Date DESC", filters);
                Int64 iTotalNews = lstListOfNewsItems.Count;

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Nov 2009
    Link to this post
    Hi v,

    You can use filter expression property directly. It is a public property and it is used to filter the content list by metakey. You will find the property under Filters section of NewsView's Advanced tab. You can use the following syntax - Category = "MyCategory" . As a result the control will show only items that are categorized  with  "MyCategory".

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. v
    v avatar
    27 posts
    Registered:
    12 Aug 2009
    11 Nov 2009
    Link to this post
    could you explain clearly

    private bool _dropDown = false;
     
    [Category("Category Settings")]
        public bool DropDownVisible
        {
            set
            {
                _dropDown = value;
            }
            get
            {
                return _dropDown;
            }
        }
    when i edit true,false automatically fill and displays the dropdownlist.
    the same way instead of boolen(true,false). i need to fill the newmodule all categories.
    from that i need to read.

    Could you please find the attachment herewith and let us know the solution ASAP
    i dnt want to  use checkbox,  need dropdownlist.


  4. v
    v avatar
    27 posts
    Registered:
    12 Aug 2009
    11 Nov 2009
    Link to this post
    find the jpeg.
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Nov 2009
    Link to this post
    Hello v,

    You are not customizing module - you are customizing NewsView control. You should use ContentFilterBuilder class instead of IMetaSearchInfo.

    For adding a dropdown that is populated with categories data you can use enum property, create a WebEditor to get the values or expose the DropDown to the basic tab, because Advanced tab support only properties of type string.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. v
    v avatar
    27 posts
    Registered:
    12 Aug 2009
    11 Nov 2009
    Link to this post
    Yes - NewsView control (I'm custamizing my own Usercontrol) i need to set the above property? is that possible?
    if it's give me sample code to do.
    Thanks
Register for webinar
6 posts, 0 answered