Content

Page tree

Example: clear variable on transition from page3 to page0

<?xml version="1.0" encoding="UTF-8"?>
<SnomIPPhoneBatch>
    <SnomIPPhoneText id="page0">
        <Title>page 0</Title>
        <SoftKeyItem>
            <Name>*</Name>
            <Url>http://link_to_this_example.xml#sub=*[@id="page1"]</Url>
        </SoftKeyItem>
        <Text>
            var:first_page: $(var:first_page)
            <br />
            prees * to continue
        </Text><!-- here variable always empty  -->
    </SnomIPPhoneText>
    <SnomIPPhoneText id="page1">
        <Title>page 1</Title>
        <SoftKeyItem>
            <Name>*</Name>
            <Url>http://link_to_this_example.xml#sub=*[@id="page2"]&amp;var:first_page=$(urlencode:hello world)</Url>
        </SoftKeyItem>
        <Text>
            var:first_page: $(var:first_page)
            <br />
            prees * to continue set var_first_page = hello_world
        </Text>
    </SnomIPPhoneText>
    <SnomIPPhoneText id="page2">
        <Title>page 2</Title>
        <SoftKeyItem>
            <Name>*</Name>
            <Url>http://link_to_this_example.xml#sub=*[@id="page3"]</Url>
        </SoftKeyItem>
        <Text>
            var:first_page: $(var:first_page)
            <br />
            prees * to continue 
        </Text>
    </SnomIPPhoneText>
    <SnomIPPhoneText id="page3">
        <Title>page 3</Title>
        <SoftKeyItem>
            <Name>*</Name>
            <Url>http://link_to_this_example.xml#sub=*[@id="page0"]&amp;clearvar</Url>
        </SoftKeyItem>
        <Text>
            var:first_page: $(var:first_page)
            <br />
            prees * to continue clearvar
        </Text>
    </SnomIPPhoneText>
</SnomIPPhoneBatch>


Result: