How do I get this part of the XML?

webadmin's Avatar

webadmin

25 Apr, 2016 07:56 PM

Sorry, because I know I've asked this before, but I'm having trouble accessing a part of the XML. Here's the XML first:

<?xml version="1.0" encoding="UTF-8"?>
<system-index-block name="2016" type="folder" current-time="1461614015581">
    <system-page id="ec20628d0a010102009d96820f135783">
        <name>test-article</name>
        <is-published>true</is-published>
        <last-published-on>1455719944462</last-published-on>
        <last-published-by>webadmin</last-published-by>
        <title>Test Article</title>
        <author>Test Author</author>
        <path>/blogs/news/2016/test-article</path>
        <site>Gatekeeper</site>
        <link>site://Gatekeeper/blogs/news/2016/test-article</link>
        <created-by>webadmin</created-by>
        <created-on>1455660491383</created-on>
        <last-modified-by>webadmin</last-modified-by>
        <last-modified>1455900999851</last-modified>
        <system-data-structure definition-path="News/Post">
            <Image type="file">
                <content />
                <path>/_skin/news/images/bg/1800x1125.png</path>
                <link>site://Gatekeeper/_skin/news/images/bg/1800x1125.png</link>
                <site>Gatekeeper</site>
                <name>1800x1125.png</name>
            </Image>
            <Default>
                <p>Several years back, I was living in a small village in the Zambian bush called Chongwe. In order to get to where I was staying, I would have to leave the capital city of Lusaka, drive for about thirty minutes until the pavement ended, travel for another fourty five minutes on a dirt road until that ended, and then another thirty minutes off roading through the golden savannah grass before finally reaching my destination. In this remote village dwelled a man of great importance to the community named Makukula. This Mr. Makukula was &amp;#8211; and currently still is &amp;#8211; the head man of the village. A strong man among strong men, Makukula was judge, jury, executioner, police commissioner, public works director, and property owner. Upon my initial arrival into the village, I met with Mr. Makukula to request his permission for my planned activity in the village. He gleefully smiled back with the two teeth he had left in his mouth and extended a gracious welcome into his village.</p>
                <p>As I was walking to what would become my home in the village for the foreseable future, I made note of Mr. Makukula&amp;#8217;s gracious hospitality to my pastor friend who was with me. To my surprise, (although looking back now, I should not have been surprised) a rumor was spreading through the village. According to the local scuttlebutt, Makukukla was linked to the death of an entire family the week prior to my arrival. Two indisputable facts formed the foundation for the gossip while wild imagination and spiritual fear provided the framework, roofing, sheetrock, wallpaper and furnishings. Fact number one: Someone cut the fencing around Makukula&amp;#8217;s property and stole some of his cattle. Fact number two: a week later, a family of five was found dead in their home. As news spread of the deaths, the connection was drawn almost instantaneously. These were the cattle thieves, and Makukula killed them with a death prayer.</p>
                <p>My initial reaction was skepticism. &amp;#8220;Did they miss the bullet holes in their heads?&amp;#8221; I asked, incredulous of the theories swirling around the mysterious figure known as Makukula. With every person I talked to, the the story got more convaluted as each one added their imagination to the narrative. Rather than diving into a dissertation over the subject of witchcraft and animism, I will stimply state this: According to animistic beliefs, everything that happens in the physical realm has a spiritual cause. In the absence of a physical connection between Makukula and the deceased family, a spiritual connection was drawn. Even so, Makukula did little to quell the rumors, as it helped establish his reputation and governance. The beautiful, lush, Zambian countryside had a gloomy shadow darkening everything.</p>
                <p>After the initial meeting, I did not see Makukula for quite some time. Days, weeks, months passed. The sun rose and set again. Bonds were formed, relationships grew, and love, joy, peace, and the Gospel were shared; however, I could not help but desire to see Mr. Makukula again. I knew I needed to get a Nyanja language Bible into his hands.
                    <br />
 On my last day in Chongwe, I made the long walk up the hill to Mr. Makukula&amp;#8217;s house. With the help of a local pastor acting as translator, I thanked Makukula for his hospitality and presented the Bible to him as a gift. Before I could begin to explain the Gospel, Makukula spoke up. I still remember his response vividly.
                </p>
                <p>&amp;#8220;For years I have prayed to God, asking Him what I must do, but I have never heard anything from Him. Now He is coming to me through you, and I am ready to receive Him.&amp;#8221;</p>
                <p>His response left me speachless. God had been at work in his life for years, and I was merely the tool through which He would speak the Gospel to Makukula. After receiving the Bible, Makukula swore to read it at least three times a day and share the good news with everyone he met. The time of fellowship together was sweet, but had to come to an end. I would not see him for another two years until I made a return visit. After being greeted by his warm, friendly smile &amp;#8211; although now missing one of his two teeth &amp;#8211; I learned that not only was he faithful in the Word and his relationship with the Lord, he was actively teaching it to others in his village. The man who at one time allowed rumors of murder to circulate is now actively teaching the way to eternal life. Through Makukula&amp;#8217;s story God revealed two great truths to me.</p>
                <p>
                    <strong>1. On my own, I am not necessary.</strong>
                </p>
                <p>This is perhaps one of the toughest pills to swallow, not just for young minister in his formative years, but for most people in general. We begin with wild eyed aspirations of changing the world. Our youthful ambitions often spill over into our ministries. When I first answered the call into full time international ministry, I knew that I was going to be the voice that would speak to entire nations. I was going to be the agent of change. It would take some time before I would realize that all I had done was take my original ambitions and merely slap a Christian name on them. However, over a series of events and a number of years, the Lord began to show me just how small a part I play in the grand scheme of His redemptive plan. He has been at work for countless eons, millenia after millenia, calling people to Himself. Only a lucky few live to see a century. I am but a minute cog in the vastly larger machine.</p>
                <p>Throughout Scripture, we see that the true agent of change, the true voice speaking to the nations is Christ Jesus and His Spirit working in the lives of men and women around the world. Paul says in his speach to the Athenians,&amp;#8221;The God who made the world and everything in it, being Lord of heaven and earth, does not live in temples made by man, nor is he served by human hands, as though he needed anything, since he himself gives to all mankind life and breath and everything.&amp;#8221; Sure we all know this to be true, but do we believe it as true? Far too often, we can find ourselves striving in ministry as though God&amp;#8217;s plans depend solely on us. We live as if the future of the Gospel rests on our shoulders and find ourselves burdened by the weight we was never meant to carry.</p>
                <p>The story of Makukula illustrates this point. I spent very little time with Makukula &amp;#8211; only a couple hours over span of a few years. I only requested that the local pastor answer any questions Makukula might have and help direct his steps &amp;#8211; the very thing he was eager to do. Lives and communities, however, are being changed, not because of what we might bring, but because the Lord works in the hearts of men and women.</p>
                <p>
                    <strong>2. Even though I offer nothing of value to God, I am wanted.</strong>
                </p>
                <p>Peter says in his first letter, &amp;#8220;You are a chosen race, a royal priesthood, a holy nation, a people for his own possession, that you may proclaim the excellencies of him who called you out of darkness into his marvelous light.&amp;#8221;Peter makes it clear here and as well as other parts of his letter that we are chosen by God as His own so that we might proclaim the Gospel of salvation and the goodness of Christ. Likewise, Paul also states in Ephesians that we are God&amp;#8217;s workmanship, created for good works. All we have to do is walk in them.</p>
                <p>This is both a source of confidence and reason to remain humble. God desires to use us for His purposes and plan. Even though we have nothing to offer Him but a willing spirit, He can move powerfully in our lives and use us to do the same in others. Even the most influencial of public ministries can only be carried out and sustained by the Holy Spirit. Let us rejoice then that God uses the weak and foolish to shame strong. Those who bring nothing to the table are the very ones God desires to use. Just as the Lord was able to work through a twenty one year old fresh out of college fellow with no idea what he was getting himself into and a village elder who had spent decades practicing witchcraft and living in darkness to advance the Gospel into a remote corner of the earth, so too is He able to use all who approach Him humbly.</p>
                <p>
                    <em>Travis Milner is currently pursuing an MA&amp;#160;at NOBTS and works in the Public Relations as a graphic designer.</em>
                </p>
            </Default>
        </system-data-structure>
    </system-page>
    <system-page id="3d12ba6e0a010102009d9682d4b4526a">
        <name>test-article2</name>
        <is-published>true</is-published>
        <title>Another Article</title>
        <author>Bob Smith</author>
        <path>/blogs/news/2016/test-article2</path>
        <site>Gatekeeper</site>
        <link>site://Gatekeeper/blogs/news/2016/test-article2</link>
        <created-by>webadmin</created-by>
        <created-on>1457018550844</created-on>
        <last-modified-by>webadmin</last-modified-by>
        <last-modified>1457018666243</last-modified>
        <system-data-structure definition-path="News/Post">
            <Image type="file">
                <content />
                <path>/_skin/news/images/bg/1800x1125.png</path>
                <link>site://Gatekeeper/_skin/news/images/bg/1800x1125.png</link>
                <site>Gatekeeper</site>
                <name>1800x1125.png</name>
            </Image>
            <Default>
                <p>Several years back, I was living in a small village in the Zambian bush called Chongwe. In order to get to where I was staying, I would have to leave the capital city of Lusaka, drive for about thirty minutes until the pavement ended, travel for another fourty five minutes on a dirt road until that ended, and then another thirty minutes off roading through the golden savannah grass before finally reaching my destination. In this remote village dwelled a man of great importance to the community named Makukula. This Mr. Makukula was &amp;#8211; and currently still is &amp;#8211; the head man of the village. A strong man among strong men, Makukula was judge, jury, executioner, police commissioner, public works director, and property owner. Upon my initial arrival into the village, I met with Mr. Makukula to request his permission for my planned activity in the village. He gleefully smiled back with the two teeth he had left in his mouth and extended a gracious welcome into his village.</p>
                <p>As I was walking to what would become my home in the village for the foreseable future, I made note of Mr. Makukula&amp;#8217;s gracious hospitality to my pastor friend who was with me. To my surprise, (although looking back now, I should not have been surprised) a rumor was spreading through the village. According to the local scuttlebutt, Makukukla was linked to the death of an entire family the week prior to my arrival. Two indisputable facts formed the foundation for the gossip while wild imagination and spiritual fear provided the framework, roofing, sheetrock, wallpaper and furnishings. Fact number one: Someone cut the fencing around Makukula&amp;#8217;s property and stole some of his cattle. Fact number two: a week later, a family of five was found dead in their home. As news spread of the deaths, the connection was drawn almost instantaneously. These were the cattle thieves, and Makukula killed them with a death prayer.</p>
                <p>My initial reaction was skepticism. &amp;#8220;Did they miss the bullet holes in their heads?&amp;#8221; I asked, incredulous of the theories swirling around the mysterious figure known as Makukula. With every person I talked to, the the story got more convaluted as each one added their imagination to the narrative. Rather than diving into a dissertation over the subject of witchcraft and animism, I will stimply state this: According to animistic beliefs, everything that happens in the physical realm has a spiritual cause. In the absence of a physical connection between Makukula and the deceased family, a spiritual connection was drawn. Even so, Makukula did little to quell the rumors, as it helped establish his reputation and governance. The beautiful, lush, Zambian countryside had a gloomy shadow darkening everything.</p>
                <p>After the initial meeting, I did not see Makukula for quite some time. Days, weeks, months passed. The sun rose and set again. Bonds were formed, relationships grew, and love, joy, peace, and the Gospel were shared; however, I could not help but desire to see Mr. Makukula again. I knew I needed to get a Nyanja language Bible into his hands.
                    <br />
 On my last day in Chongwe, I made the long walk up the hill to Mr. Makukula&amp;#8217;s house. With the help of a local pastor acting as translator, I thanked Makukula for his hospitality and presented the Bible to him as a gift. Before I could begin to explain the Gospel, Makukula spoke up. I still remember his response vividly.
                </p>
                <p>&amp;#8220;For years I have prayed to God, asking Him what I must do, but I have never heard anything from Him. Now He is coming to me through you, and I am ready to receive Him.&amp;#8221;</p>
                <p>His response left me speachless. God had been at work in his life for years, and I was merely the tool through which He would speak the Gospel to Makukula. After receiving the Bible, Makukula swore to read it at least three times a day and share the good news with everyone he met. The time of fellowship together was sweet, but had to come to an end. I would not see him for another two years until I made a return visit. After being greeted by his warm, friendly smile &amp;#8211; although now missing one of his two teeth &amp;#8211; I learned that not only was he faithful in the Word and his relationship with the Lord, he was actively teaching it to others in his village. The man who at one time allowed rumors of murder to circulate is now actively teaching the way to eternal life. Through Makukula&amp;#8217;s story God revealed two great truths to me.</p>
                <p>
                    <strong>1. On my own, I am not necessary.</strong>
                </p>
                <p>This is perhaps one of the toughest pills to swallow, not just for young minister in his formative years, but for most people in general. We begin with wild eyed aspirations of changing the world. Our youthful ambitions often spill over into our ministries. When I first answered the call into full time international ministry, I knew that I was going to be the voice that would speak to entire nations. I was going to be the agent of change. It would take some time before I would realize that all I had done was take my original ambitions and merely slap a Christian name on them. However, over a series of events and a number of years, the Lord began to show me just how small a part I play in the grand scheme of His redemptive plan. He has been at work for countless eons, millenia after millenia, calling people to Himself. Only a lucky few live to see a century. I am but a minute cog in the vastly larger machine.</p>
                <p>Throughout Scripture, we see that the true agent of change, the true voice speaking to the nations is Christ Jesus and His Spirit working in the lives of men and women around the world. Paul says in his speach to the Athenians,&amp;#8221;The God who made the world and everything in it, being Lord of heaven and earth, does not live in temples made by man, nor is he served by human hands, as though he needed anything, since he himself gives to all mankind life and breath and everything.&amp;#8221; Sure we all know this to be true, but do we believe it as true? Far too often, we can find ourselves striving in ministry as though God&amp;#8217;s plans depend solely on us. We live as if the future of the Gospel rests on our shoulders and find ourselves burdened by the weight we was never meant to carry.</p>
                <p>The story of Makukula illustrates this point. I spent very little time with Makukula &amp;#8211; only a couple hours over span of a few years. I only requested that the local pastor answer any questions Makukula might have and help direct his steps &amp;#8211; the very thing he was eager to do. Lives and communities, however, are being changed, not because of what we might bring, but because the Lord works in the hearts of men and women.</p>
                <p>
                    <strong>2. Even though I offer nothing of value to God, I am wanted.</strong>
                </p>
                <p>Peter says in his first letter, &amp;#8220;You are a chosen race, a royal priesthood, a holy nation, a people for his own possession, that you may proclaim the excellencies of him who called you out of darkness into his marvelous light.&amp;#8221;Peter makes it clear here and as well as other parts of his letter that we are chosen by God as His own so that we might proclaim the Gospel of salvation and the goodness of Christ. Likewise, Paul also states in Ephesians that we are God&amp;#8217;s workmanship, created for good works. All we have to do is walk in them.</p>
                <p>This is both a source of confidence and reason to remain humble. God desires to use us for His purposes and plan. Even though we have nothing to offer Him but a willing spirit, He can move powerfully in our lives and use us to do the same in others. Even the most influencial of public ministries can only be carried out and sustained by the Holy Spirit. Let us rejoice then that God uses the weak and foolish to shame strong. Those who bring nothing to the table are the very ones God desires to use. Just as the Lord was able to work through a twenty one year old fresh out of college fellow with no idea what he was getting himself into and a village elder who had spent decades practicing witchcraft and living in darkness to advance the Gospel into a remote corner of the earth, so too is He able to use all who approach Him humbly.</p>
                <p>
                    <em>Travis Milner is currently pursuing an MA&amp;#160;at NOBTS and works in the Public Relations as a graphic designer.</em>
                </p>
            </Default>
        </system-data-structure>
    </system-page>
    <system-page id="3d12ca310a010102009d96825d17b270">
        <name>test-article3</name>
        <is-published>true</is-published>
        <title>Last Article</title>
        <author>James Taylor</author>
        <path>/blogs/news/2016/test-article3</path>
        <site>Gatekeeper</site>
        <link>site://Gatekeeper/blogs/news/2016/test-article3</link>
        <created-by>webadmin</created-by>
        <created-on>1457018554907</created-on>
        <last-modified-by>webadmin</last-modified-by>
        <last-modified>1457018687323</last-modified>
        <system-data-structure definition-path="News/Post">
            <Image type="file">
                <content />
                <path>/_skin/news/images/bg/1800x1125.png</path>
                <link>site://Gatekeeper/_skin/news/images/bg/1800x1125.png</link>
                <site>Gatekeeper</site>
                <name>1800x1125.png</name>
            </Image>
            <Default>
                <p>Several years back, I was living in a small village in the Zambian bush called Chongwe. In order to get to where I was staying, I would have to leave the capital city of Lusaka, drive for about thirty minutes until the pavement ended, travel for another fourty five minutes on a dirt road until that ended, and then another thirty minutes off roading through the golden savannah grass before finally reaching my destination. In this remote village dwelled a man of great importance to the community named Makukula. This Mr. Makukula was &amp;#8211; and currently still is &amp;#8211; the head man of the village. A strong man among strong men, Makukula was judge, jury, executioner, police commissioner, public works director, and property owner. Upon my initial arrival into the village, I met with Mr. Makukula to request his permission for my planned activity in the village. He gleefully smiled back with the two teeth he had left in his mouth and extended a gracious welcome into his village.</p>
                <p>As I was walking to what would become my home in the village for the foreseable future, I made note of Mr. Makukula&amp;#8217;s gracious hospitality to my pastor friend who was with me. To my surprise, (although looking back now, I should not have been surprised) a rumor was spreading through the village. According to the local scuttlebutt, Makukukla was linked to the death of an entire family the week prior to my arrival. Two indisputable facts formed the foundation for the gossip while wild imagination and spiritual fear provided the framework, roofing, sheetrock, wallpaper and furnishings. Fact number one: Someone cut the fencing around Makukula&amp;#8217;s property and stole some of his cattle. Fact number two: a week later, a family of five was found dead in their home. As news spread of the deaths, the connection was drawn almost instantaneously. These were the cattle thieves, and Makukula killed them with a death prayer.</p>
                <p>My initial reaction was skepticism. &amp;#8220;Did they miss the bullet holes in their heads?&amp;#8221; I asked, incredulous of the theories swirling around the mysterious figure known as Makukula. With every person I talked to, the the story got more convaluted as each one added their imagination to the narrative. Rather than diving into a dissertation over the subject of witchcraft and animism, I will stimply state this: According to animistic beliefs, everything that happens in the physical realm has a spiritual cause. In the absence of a physical connection between Makukula and the deceased family, a spiritual connection was drawn. Even so, Makukula did little to quell the rumors, as it helped establish his reputation and governance. The beautiful, lush, Zambian countryside had a gloomy shadow darkening everything.</p>
                <p>After the initial meeting, I did not see Makukula for quite some time. Days, weeks, months passed. The sun rose and set again. Bonds were formed, relationships grew, and love, joy, peace, and the Gospel were shared; however, I could not help but desire to see Mr. Makukula again. I knew I needed to get a Nyanja language Bible into his hands.
                    <br />
 On my last day in Chongwe, I made the long walk up the hill to Mr. Makukula&amp;#8217;s house. With the help of a local pastor acting as translator, I thanked Makukula for his hospitality and presented the Bible to him as a gift. Before I could begin to explain the Gospel, Makukula spoke up. I still remember his response vividly.
                </p>
                <p>&amp;#8220;For years I have prayed to God, asking Him what I must do, but I have never heard anything from Him. Now He is coming to me through you, and I am ready to receive Him.&amp;#8221;</p>
                <p>His response left me speachless. God had been at work in his life for years, and I was merely the tool through which He would speak the Gospel to Makukula. After receiving the Bible, Makukula swore to read it at least three times a day and share the good news with everyone he met. The time of fellowship together was sweet, but had to come to an end. I would not see him for another two years until I made a return visit. After being greeted by his warm, friendly smile &amp;#8211; although now missing one of his two teeth &amp;#8211; I learned that not only was he faithful in the Word and his relationship with the Lord, he was actively teaching it to others in his village. The man who at one time allowed rumors of murder to circulate is now actively teaching the way to eternal life. Through Makukula&amp;#8217;s story God revealed two great truths to me.</p>
                <p>
                    <strong>1. On my own, I am not necessary.</strong>
                </p>
                <p>This is perhaps one of the toughest pills to swallow, not just for young minister in his formative years, but for most people in general. We begin with wild eyed aspirations of changing the world. Our youthful ambitions often spill over into our ministries. When I first answered the call into full time international ministry, I knew that I was going to be the voice that would speak to entire nations. I was going to be the agent of change. It would take some time before I would realize that all I had done was take my original ambitions and merely slap a Christian name on them. However, over a series of events and a number of years, the Lord began to show me just how small a part I play in the grand scheme of His redemptive plan. He has been at work for countless eons, millenia after millenia, calling people to Himself. Only a lucky few live to see a century. I am but a minute cog in the vastly larger machine.</p>
                <p>Throughout Scripture, we see that the true agent of change, the true voice speaking to the nations is Christ Jesus and His Spirit working in the lives of men and women around the world. Paul says in his speach to the Athenians,&amp;#8221;The God who made the world and everything in it, being Lord of heaven and earth, does not live in temples made by man, nor is he served by human hands, as though he needed anything, since he himself gives to all mankind life and breath and everything.&amp;#8221; Sure we all know this to be true, but do we believe it as true? Far too often, we can find ourselves striving in ministry as though God&amp;#8217;s plans depend solely on us. We live as if the future of the Gospel rests on our shoulders and find ourselves burdened by the weight we was never meant to carry.</p>
                <p>The story of Makukula illustrates this point. I spent very little time with Makukula &amp;#8211; only a couple hours over span of a few years. I only requested that the local pastor answer any questions Makukula might have and help direct his steps &amp;#8211; the very thing he was eager to do. Lives and communities, however, are being changed, not because of what we might bring, but because the Lord works in the hearts of men and women.</p>
                <p>
                    <strong>2. Even though I offer nothing of value to God, I am wanted.</strong>
                </p>
                <p>Peter says in his first letter, &amp;#8220;You are a chosen race, a royal priesthood, a holy nation, a people for his own possession, that you may proclaim the excellencies of him who called you out of darkness into his marvelous light.&amp;#8221;Peter makes it clear here and as well as other parts of his letter that we are chosen by God as His own so that we might proclaim the Gospel of salvation and the goodness of Christ. Likewise, Paul also states in Ephesians that we are God&amp;#8217;s workmanship, created for good works. All we have to do is walk in them.</p>
                <p>This is both a source of confidence and reason to remain humble. God desires to use us for His purposes and plan. Even though we have nothing to offer Him but a willing spirit, He can move powerfully in our lives and use us to do the same in others. Even the most influencial of public ministries can only be carried out and sustained by the Holy Spirit. Let us rejoice then that God uses the weak and foolish to shame strong. Those who bring nothing to the table are the very ones God desires to use. Just as the Lord was able to work through a twenty one year old fresh out of college fellow with no idea what he was getting himself into and a village elder who had spent decades practicing witchcraft and living in darkness to advance the Gospel into a remote corner of the earth, so too is He able to use all who approach Him humbly.</p>
                <p>
                    <em>Travis Milner is currently pursuing an MA&amp;#160;at NOBTS and works in the Public Relations as a graphic designer.</em>
                </p>
            </Default>
        </system-data-structure>
    </system-page>
</system-index-block>

I'm trying to get the stuff inside the "News/Post" block. I can get the system-page items without any trouble. But how do I access the News/Post block? I've tried getting the child of the system-page, but that doesn't seem to work.

  1. 1 Posted by Ryan Griffith on 25 Apr, 2016 08:17 PM

    Ryan Griffith's Avatar

    Hi,

    If you are using XSLT, the Format would look something like:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output indent="yes"/>
    
        <xsl:template match="/system-index-block">
            <xsl:apply-templates select="system-page"/>
        </xsl:template>
    
        <xsl:template match="system-page">
            <xsl:value-of select="title"/>
            <img>
               <xsl:attribute name="src"><xsl:value-of select="system-index-block/Image/link"/></xsl:attribute>
            </img>
            <xsl:copy-of select="system-index-block/Default/node()"/>
        </xsl:template>
    </xsl:stylesheet>
    

    If you are using Velocity, the Format would look something like:

    #set ($pages = $_XPathTool.selectNodes($contentRoot, "/system-index-block/system-page"))
    #if ($pages.size() > 0)
      #foreach ($page in $pages)
        #set ($pageSD = $page.getChild("system-data-structure"))
        #set ($default = $pageSD.getChild("Default"))
        #set ($image = $pageSD.getChild("Image"))
        
        $_EscapeTool.xml($page.getChild("title").value)
        <img src="${image.getChild('link').value}" />
        $_SerializerTool.serialize($default, false)
      #end
    #end
    

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by webadmin on 25 Apr, 2016 08:29 PM

    webadmin's Avatar

    Wow... shockingly, that worked, even though I'm virtually positive I tried that exact code first. BTW, what does the whole EscapeTool and SerializerTool line do?

  3. 3 Posted by Ryan Griffith on 25 Apr, 2016 08:32 PM

    Ryan Griffith's Avatar

    Thank you for following up, I am glad to hear the snippet I provided did the trick.

    The Escape Tool will escape certain characters to ensure the content being output contains valid XML. The Serializer Tool converts XML data to text.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  4. Ryan Griffith closed this discussion on 25 Apr, 2016 08:32 PM.

  5. webadmin re-opened this discussion on 25 Apr, 2016 08:42 PM

  6. 4 Posted by webadmin on 25 Apr, 2016 08:42 PM

    webadmin's Avatar

    Sorry, one more thing to ask. Why do you have to have brackets around the image link request? I tried it without them, and I get nothing back, and I can't quite figure out why.

  7. 5 Posted by Bradley Wagner on 25 Apr, 2016 09:20 PM

    Bradley Wagner's Avatar

    Are you referring to the use of curly braces here?

        <img src="${image.getChild('link').value}" />
    

    If so, it's because you're embedding the expression inside of markup that you're wanting to output and our parser has to know where your expression begins/ends and what to treat as a string literal.

    Please let me know if that makes sense.

    Thanks!

  8. Bradley Wagner closed this discussion on 25 Apr, 2016 09:20 PM.

  9. webadmin re-opened this discussion on 25 Apr, 2016 09:34 PM

  10. 6 Posted by webadmin on 25 Apr, 2016 09:34 PM

    webadmin's Avatar

    That makes sense... I assumed that's what it was, so I tried to get the link value out of the $image item directly, and it wouldn't come out. No matter, I got it working now. Thanks!

  11. Bradley Wagner closed this discussion on 25 Apr, 2016 09:36 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac