# Inline Parameters

> Replace placeholders like {{name}} inside text elements without replacing the entire text content

- **URL**: https://orshot.com/docs/orshot-studio/inline-parameters

---

Inline parameters let you insert dynamic values into specific parts of a text element. Instead of replacing the entire text, you write placeholders like `}` and pass values for each one at render time.

This is useful when your text has a fixed structure but certain words change per render — names, dates, prices, locations, or any variable data embedded in a sentence.

## How It Works

1. **Write placeholders** in your text element using double curly braces: `}`
2. **Set a Parameter ID** on the element (e.g., `heading`)
3. **Pass values** via the API using colon notation: `"heading:paramName": "value"`

The placeholders get replaced with your values. Everything else in the text stays as-is.

## Example

Say you have a text element with Parameter ID `greeting` and this content:```
Hello {{name}}, welcome to {{city}}!
```Pass these modifications in your API request:```json
{
  "modifications": {
    "greeting:name": "Sarah",
    "greeting:city": "New York"
  }
}
```The rendered output becomes: **Hello Sarah, welcome to New York!**

## Setting Up Inline Parameters

### 1. Add placeholders to your text

In Orshot Studio, select a text element and write your content with `}` where you want dynamic values:```
Invoice #{{invoice_id}} — Due: {{due_date}}
```Placeholder names can contain letters, numbers, hyphens, and underscores.

### 2. Parameterize the element

Open the **API** tab in the sidebar, toggle **Parameterize** on, and set a **Parameter ID** (e.g., `invoice-header`).

### 3. Pass values via the API

Use colon notation — `parameterId:placeholderName` — to set each value:```json
{
  "templateId": "<YOUR_TEMPLATE_ID>",
  "modifications": {
    "invoice-header:invoice_id": "INV-2024-0042",
    "invoice-header:due_date": "May 15, 2025"
  },
  "response": {
    "format": "png",
    "type": "url"
  }
}
```## Combining with Full Text Replacement

You can replace the entire text content AND fill inline parameters in the same request. The full text replacement happens first, then inline parameters are resolved.```json
{
  "modifications": {
    "body": "Dear {{name}}, your order {{order_id}} has shipped.",
    "body:name": "Alex",
    "body:order_id": "ORD-9981"
  }
}
```This replaces the element's original text with the new template, then fills in `}` and `}`.

## Multiple Placeholders

A single text element can have as many placeholders as you need:```json
{
  "modifications": {
    "certificate:student": "Maria Garcia",
    "certificate:course": "Advanced Machine Learning",
    "certificate:date": "April 28, 2025",
    "certificate:instructor": "Dr. James Chen",
    "certificate:hours": "40"
  }
}
```## Multi-Page Templates

For templates with multiple pages, prefix the key with the page number:```json
{
  "modifications": {
    "page1@heading:name": "Front Page Name",
    "page2@heading:name": "Back Page Name"
  }
}
```Without a page prefix, the value applies to all pages where that element exists.

## Unfilled Placeholders

If you don't pass a value for a placeholder, it stays as `}` in the output. This makes it easy to spot missing data during development.

## Works with Flow Text

Inline parameters work in [flow text elements](https://orshot.com/docs/orshot-studio/flowing-content) too. The placeholders are resolved before the text is split across pages, so your values flow naturally with the content.

## Tips

- **Naming**: use descriptive names like `}` instead of `}` — they show up in the Studio API tab and make your template self-documenting
- **Inline styles**: you can combine inline parameters with [inline text styles](https://orshot.com/docs/orshot-studio/inline-text-styles) — e.g., `<b>}</b>` will render the replaced name in bold
- **Text elements only**: inline parameters work on text elements. For images, shapes, and other element types, use the standard Parameter ID

## Related

- [Setting Parameters](https://orshot.com/docs/orshot-studio/setting-parameters) — Making elements dynamic with Parameter IDs
- [Inline Text Styles](https://orshot.com/docs/orshot-studio/inline-text-styles) — Bold, italic, colors within text
- [Render from Studio Template](https://orshot.com/docs/api-reference/render-from-studio-template) — Full API reference