//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CommunityServer.Controls
{
	/// <summary>
	/// Summary description for ListItemLink.
	/// </summary>
	public class ListItemLink : HyperLink
	{
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            if (IsListItem)
            {
                if (CommunityServer.Components.Globals.IsNullorEmpty(this.ListItemCssClass))
                    writer.Write("<li>");
                else
                    writer.Write("<li class=\"{0}\">", this.ListItemCssClass);
            }

           base.Render (writer);

            if(IsListItem)
           writer.Write("</li>");
        }

        private bool _isListItem = true;
        public bool IsListItem
        {
            get{return _isListItem;}
            set{_isListItem = value;}
        }

        private string _isListItemCssClass = null;
        public string ListItemCssClass
        {
            get { return _isListItemCssClass; }
            set { _isListItemCssClass = value; }
        }

	}

}
