Exemplo n.º 1
0
        public virtual string PageTopRender(TextWriter output, XElement xml = null, string xlst = @"../pagemenux.xslt", string link = null)
        {
            xml = xml ?? PageTopXml;
            if (link != null)
            {
                xml.Attribute("LINK").SetValue(link);
            }

            var menuXslt = SegmentLang.Instance.PhysicalPath + xlst;

            if (!File.Exists(menuXslt))
            {
                menuXslt = SegmentLang.Instance.PhysicalPath + @"../pagemenux.xslt";
            }

            var render = new PageTopRender {
                Xml = xml, Xslt = menuXslt, Link = link
            };

            render.Render(output);

            return(String.Empty);
        }
Exemplo n.º 2
0
        public virtual string PageTopRender(TextWriter output, XElement xml = null, string xlst = @"../pagemenux.xslt",  string link = null)
        {
            xml = xml ?? PageTopXml;
            if (link != null)
                xml.Attribute("LINK").SetValue(link);

            var menuXslt = SegmentLang.Instance.PhysicalPath + xlst;
            if (!File.Exists(menuXslt))
                menuXslt = SegmentLang.Instance.PhysicalPath + @"../pagemenux.xslt";

            var render = new PageTopRender { Xml = xml, Xslt = menuXslt, Link = link };
            render.Render(output);

            return String.Empty;
        }