Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var obj1 = new PigeonCms.Placeholder();
        var cache = new CacheManager<PigeonCms.Placeholder>("PigeonCms.Placeholder");
        if (cache.IsEmpty(this.Name))
        {
            obj1 = new PlaceholdersManager().GetByName(this.Name);
            cache.Insert(this.Name, obj1);
        }
        else
        {
            obj1 = cache.GetValue(this.Name);
        }

        LitContent.Text = "";
        if (obj1.Visible)
        {
            LitContent.Text = obj1.Content;
        }
    }
Example #2
0
    protected void Grid1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            var item = new PigeonCms.Placeholder();
            item = (PigeonCms.Placeholder)e.Row.DataItem;

            LinkButton LnkName = (LinkButton)e.Row.FindControl("LnkName");
            LnkName.Text = "<i class='fa fa-pgn_edit fa-fw'></i>";
            LnkName.Text += Utility.Html.GetTextPreview(item.Name, 30, "");
            if (string.IsNullOrEmpty(item.Name))
                LnkName.Text += Utility.GetLabel("NO_VALUE", "<no value>");

        }
    }