Template Tags

Last updated: August 28th 2019

You can simply fetch address by using your channel_short_name field. Although we have few parameters that you can optionally use to get better output.

Parameters:

separator

Seperator will print full address with your separator value passed. Default is comma (,)

{my_saf separator=","}

// Source: 
Address 1 : 4047  Small Street
City: New York
State: NY
Zip Code: 10007

// Output:
4047  Small Street, New York, NY, 10007.

prefix

prefix is used with tagpair code. You can assign any prefix and then use it to fetch subfields. Default prefix is item.

{super_address prefix="address"}
    {address:address_1} // Prints Address 1
    {address:address_2} // Prints Address 2 and so on…
{/super_address}

Examples

Normal Field:
{exp:channel:entries channel="super_address" dynamic="no" limit="1"}
    {!--Full Address--}
    {super_address} // Prints Full address comma seperated.
    {super_address separator="|"} // Prints Full address ("|" seperated).
    
    {!--Any Subfield of address--}
    {super_address:address_1} // Prints address 1
    {super_address:address_2} // Prints address 2 and so on…
    
    {!--Tag pair--}
    {super_address}
        {item:address_1} // Prints Address 1
        {item:address_2} // Prints Address 2 and so on…
    {/super_address}
    
    {!--Tag pair with prefix--}
    {super_address prefix="address"}
        {address:address_1} // Prints Address 1
        {address:address_2} // Prints Address 2 and so on…
    {/super_address}
{/exp:channel:entries}
Grid Field:
{exp:channel:entries channel="super_address" dynamic="no" limit="1"}
    {!--Full Address--}
    {grid}
	    {grid:super_address} // Prints Full address comma seperated.
    {/grid}

    {grid}
        {grid:super_address separator="|"} // Prints Full address ("|" seperated).
    {/grid}

    {!--Any Subfield of address--}
    {grid}
        {grid:super_address:address_1} // Prints address 1
    {/grid}
    
    {grid}
        {grid:super_address:address_2} // Prints address 2 and so on…
    {/grid}
    
    {!--Tag pair--}
    {grid}
        {grid:super_address}
            {item:address_1} // Prints Address 1
            {item:address_2} // Prints Address 2 and so on…
        {/grid:super_address}
    {/grid}
    
    {!--Tag pair with prefix--}
    {grid}
        {grid:super_address prefix="address"}
            {address:address_1} // Prints Address 1
            {address:address_2} // Prints Address 2 and so on…
        {/grid:super_address}
    {/grid}
{/exp:channel:entries}
Fluid Field:
{exp:channel:entries channel="super_address" dynamic="no" limit="1"}
    {fluid}
        {!--Normal Field --}
        {fluid:super_address}
            {content}
                {item:address_1} // Prints Address 1
                {item:address_2} // Prints Address 2 and so on…
            {/content}
        {/fluid:super_address}
        
        {!--Grid Field--}
        {fluid:grid}
            {content}
                {content:super_address:address_1} // Prints Address 1
                {content:super_address:address_2} // Prints Address 2 and so on…
            {/content}
        {/fluid:grid}
    {/fluid}
{/exp:channel:entries}