Script Url Parameter - auto_template

Description

This is used to suppress the predefined templates. Each canvas has a predefined template defined by FatSecret which you can overload (see Canvas Reference to see what the these look like). If you do not use the predefined templates you will have to set your own layout (see Manually Loading Content for more).

Values

true
Turns on the predefined templates
false
Turns off the predefined templates
default
Default value is "true"

Example

auto_template = "true"
<script src="https://platform.fatsecret.com/js?key=XXXXX&auto_template=true"></script>
Figure 1: Predefined templates turned on (showing the food.get canvas)
auto_template = "false"
<script src="https://platform.fatsecret.com/js?key=XXXXX&auto_template=false"></script>

<script>fatsecret.writeHolder("search");</script>
<script>fatsecret.writeHolder("foodtitle");</script>
<script>fatsecret.writeHolder("nutritionpanel");</script>
Figure 2: Predefined templates turned off with a simple layout for the food.get canvas
FatSecret Sites
For Developers

For Professionals

For Everyone

FatSecret Platform API

Support
API

About FatSecret

© 2021 FatSecret. All rights reserved.