Lorem ipsum dolor sit amet.
Subtitle
...Hello, World!
` Next, `git commit` and `git push` it to your live site. Once you've pushed these changes, refresh your browser to see the change on your live site. It should look something like this:  Now that we've successfully made our first modification with the Developer Platform, we'll apply this new knowledge in more advanced ways in Part 2. Part 2 - Displaying Dynamic Content[](https://developers.squarespace.com/beginner-tutorial#part-2---displaying-dynamic-content) -------------------------------------------------------------------------------------------------------------------------------- In part 1 you made a simple change to your website's HTML. You can add any static HTML, CSS or JavaScript code to your Squarespace website. However, the power of the Squarespace Developer Platform is it's ability to display dynamic content. In other words, content from the Squarespace online editor. To display dynamic content, you'll need to use [JSON-T](https://developers.squarespace.com/what-is-json-t) , the template language used on the Squarespace platform. Let's try adding some JSON-T to your template. To begin, locate your site header in the `site.region` file. It should look like this: Code `{description}
{.end}` Code `This is the page description.
` Handling an Array[](https://developers.squarespace.com/templating-basics#handling-an-array) -------------------------------------------------------------------------------------------- When scoping into a section with multiple items, commonly known as an array, JSON-T uses the syntax `{.repeated section key}{.end}` instead of `{.section key}{.end}`. Every piece of code within the opening and closing scope tags will be repeated for each item in the array. JavascriptCode `// JSON Data { "items" : [ { "title" : "First Item", "description" : "This is the first item description." }, { "title" : "Second Item", "description" : "This is the second item description." }, { "title" : "Third Item", "description" : "This is the third item description." } ] }` Code ` {.repeated section items}{description}
This is the first item description.
This is the second item description.
This is the third item description.
{description}
This is the page description.
{description}
{description}
There are no items here.
{.end}There are no items here.
` Using Dot Notation[](https://developers.squarespace.com/templating-basics#using-dot-notation) ---------------------------------------------------------------------------------------------- You can add any JSON value to your template by writing the key and its parent object in dot notation. This method of scoping only defines the scope for this one single value, so no end tag is required in JSON-T. Code `// JSON Data { "collection" : { "title" : "Page Title", "description" : "This is the page description." } }{collection.description}
This is the page description.
` Referencing the Scope[](https://developers.squarespace.com/templating-basics#referencing-the-scope) ---------------------------------------------------------------------------------------------------- Using scope reference, written as `{@}`, allows you to reference the key you're scoped into. This is like `(this)` in JavaScript. Code `// JSON Data { "collection" : { "title" : "Page Title", "description" : "This is the page description." } } {.section collection} {.section title}{@}
{.end} {.end}This is the page description.
` Using an If Statement[](https://developers.squarespace.com/templating-basics#using-an-if-statement) ---------------------------------------------------------------------------------------------------- If statements check to see if a section exists without scoping into that section. JavascriptCode `// JSON Data { "items" : [ { "title" : "First Item", "description" : "This is the first item description." }, { "title" : "Second Item", "description" : "This is the second item description.", "featured" : true }, { "title" : "Third Item", "description" : "This is the third item description." } ] }` Code ` {.repeated section items} {.if featured}{description}
{description}
This is the first item description.
This is the second item description.
This is the third item description.