pagehive

put_partial

Create or replace one partial.

Draft contentChanges dataAll plans

What it does

Create or replace one partial. Pages include it with {% include 'name' %}.

Plans

Works on every plan: Free, Basic, Pro and Ultra.

Parameters

NameTypeAbout
site_idrequiredstringThe id of the site. list_sites gives the ids of your sites.
namerequiredstringThe partial's name. Pages include it with {% include 'name' %}.
sourcerequiredstringThe partial's HTML with Liquid.
messagestringA short note for the version history, like a commit message.
verbosebooleantrue lists every file and page of the draft. Otherwise the response lists only what this call changed, plus draft totals.

Example

Call put_partial with these arguments:

{
  "site_id": "01a1…",
  "name": "footer",
  "source": "<footer>© Team recipes</footer>"
}

Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.

Related guides