protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            _page = CmsService.Instance.GetItem<SiteSearchResultPage>();

            Controls.Add(new LiteralControl("<div class=\"news-list\">"));

            _output = new Literal();
            Controls.Add(_output);

            _pager = new Pager();
            _pager.ItemsPerPage = _defaultItemsPerPage;
            Controls.Add(_pager);

            Controls.Add(new LiteralControl("</div>"));
        }
        protected void RenderOutput(SiteSearchResultPage item, HtmlWriter writer)
        {
            IEnumerable<SearchRecord> records = _result.Records;
            records = _pager.Visible ? records.Skip(_pager.Skip).Take(_pager.Take) : records.Take(_page.MaxItemsShown);
            var page = CmsService.Instance.GetItem<SiteSearchResultPage>();
            if (!page.Intro.IsEmpty)
            {
                var query = SearchFilter.FromUrl().Query;
                var intro = page.Intro.AsHtml.Replace("[QUERY]",
                                                      string.IsNullOrEmpty(query)
                                                          ? ""
                                                          : string.Format("<span class=\"search-word\">{0}</span>",
                                                                          HttpUtility.HtmlEncode(query)));
                writer.RenderFullTag(HtmlTextWriterTag.H2, intro, "intro");
            }

            RenderResults(writer, records.ToArray());
        }