Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IFooterLinksGetter    footerLinksGetter = ObjectFactory.GetInstance <IFooterLinksGetter>();
        FooterLinksCollection collection        = footerLinksGetter.GetLinks();

        rptContainer1.DataSource = collection.Section1Links;
        rptContainer1.DataBind();

        rptContainer2.DataSource = collection.Section2Links;
        rptContainer2.DataBind();

        rptContainer3.DataSource = collection.Section3Links;
        rptContainer3.DataBind();

        rptContainer4.DataSource = collection.Section4Links;
        rptContainer4.DataBind();
    }
Exemplo n.º 2
0
        public FooterLinksCollection GetLinks(int FooterLinksNodeId)
        {
            FooterLinksCollection collection = new FooterLinksCollection();

            // Get the Footer Links item
            var node = new Node(FooterLinksNodeId);

            string section1LinksString = node.GetProperty("section1FooterLinks").Value;
            string section2LinksString = node.GetProperty("section2FooterLinks").Value;
            string section3LinksString = node.GetProperty("section3FooterLinks").Value;
            string section4LinksString = node.GetProperty("section4FooterLinks").Value;

            collection.Section1Links = ExtractLinksFromXml(section1LinksString);
            collection.Section2Links = ExtractLinksFromXml(section2LinksString);
            collection.Section3Links = ExtractLinksFromXml(section3LinksString);
            collection.Section4Links = ExtractLinksFromXml(section4LinksString);

            return(collection);
        }