Navigation, Sidebars, Footers & Featured Pages

Part of the Content API. Endpoints for the pieces pages share: navigation bars, sidebars, footers, banners and the anna-modern Featured Pages tiles.

/api/v3/content/navigation-bars/

Scopes: navigation:read / navigation:write. A site has one bar per position: top_primary, bottom_primary, top_secondary, bottom_secondary, seller_leads (some are hidden on some designs, matching the admin). Bars are read-only; edit their links.

  • GET /navigation-bars/ and GET /navigation-bars/<id>/ return {"id", "type", "label", "links": [{"id", "type", "url", "anchor_text", "nofollow", "order"}]}.
  • POST /navigation-bars/<id>/links/ adds a link (at the end, or at a zero-based order) and returns the bar.
  • PUT /navigation-bars/<id>/links/ with {"links": [...]} makes the bar’s links exactly that list, in that order. An entry with an id keeps that link (and any fields it omits), so a pure reorder is {"links": [{"id": 12}, {"id": 10}]}; entries without id are created; links not mentioned are deleted. Ids never change.
  • GET/PATCH/DELETE /navigation-bars/<id>/links/<link_id>/ edit one link. PATCH accepts order to move it.

A link is {"type": "custom"|"contact", "url", "anchor_text", "nofollow"}. custom links need url and anchor_text; a contact link renders the site’s contact link and needs neither. type defaults to custom, nofollow to false.

Undo: every change to a navigation bar’s links is a revision at /content/navigation-bars/<id>/revisions/, covering the whole list and its order; revert one to put it back. See Revisions and undo.

From the command line: geekcli nav get top_primary, geekcli nav update top_primary <link> --text … --url … with geekcli (see the geekcli guide).

/api/v3/content/sidebars/

Scopes: sidebars:read / sidebars:write.

  • GET /sidebars/ (?name=, ?q=), POST /sidebars/ with {"name", "items"?}.
  • GET/PATCH/DELETE /sidebars/<id>/. Detail responses include used_by, the slugs of up to 500 pages using the sidebar, and used_by_count. PATCH accepts name and/or a full items list. The two built-in sidebars (special: true) cannot be renamed or deleted. Deleting a sidebar that pages use returns 409 unless ?force=true, which detaches it from them.
  • POST /sidebars/<id>/items/ adds an item (at the end, or at order); PUT /sidebars/<id>/items/ with {"items": [...]} reconciles the list the same way navigation links do: entries with id are kept and updated, others created, unmentioned items deleted, ids preserved.
  • GET/PATCH/DELETE /sidebars/<id>/items/<item_id>/ edit one item; PATCH accepts order to move it.

An item is one of:

{"type": "html",
 "html": "<p>Sanitized HTML</p>"}

{"type": "links",
 "header": {"text": "Featured Areas",
            "url": "/areas/"},
 "links": [
   {"url": "/areas/downtown/",
    "anchor": "Downtown"},
   {"anchor": "plain text"}],
 "columns": 2}

header is optional (or null), columns is 1 (default) or 2, and a link without url renders as plain text. PATCH on a links item keeps the parts you do not send.

Undo: every change to a sidebar is a revision at /content/sidebars/<id>/revisions/, covering its name and its whole list of items; revert one to put it back. See Revisions and undo.

From the command line: geekcli sidebars list, geekcli sidebars add-links <sidebar> --link Text=/url/ with geekcli (see the geekcli guide).

Footers

/api/v3/content/footers/

Scopes: footers:read / footers:write. Blocks of HTML that pages share; footer 1 is the site default and cannot be deleted.

  • GET /footers/, POST /footers/ with {"content": "<p>...</p>"} (sanitized).
  • GET/PATCH/PUT/DELETE /footers/<id>/. Detail responses include used_by (the slugs of up to 500 pages) and used_by_count. Deleting a footer that pages use returns 409 unless ?force=true, which detaches it.

A footer reads as {"id", "name", "default", "content"}. Attach one to a page with its footer field. Footers keep revisions of content (GET /content/footers/<id>/revisions/) with the same undo flow as pages — see Revisions and undo.

From the command line: geekcli footers update 1 --content-file footer.html, geekcli footers revisions 1 with geekcli (see the geekcli guide).

Banners

/api/v3/content/banners/

Scopes: pages:read / pages:write. A banner is a one-line message with a button, shown across the top of the pages it is attached to. It is not the header image: that is a page’s landscape override or the HEADER_IMAGE setting.

  • GET /banners/, POST /banners/ with {"name", "message", "url", "call_to_action"}.
  • GET/PATCH/PUT/DELETE /banners/<id>/. Detail responses include used_by (the slugs of up to 500 pages) and used_by_count. Deleting a banner that pages show returns 409 unless ?force=true, which takes it off them.

name (≤100, unique per site) is the internal name; message (≤150, optional) is the text; call_to_action (≤50) is the button text and url (≤512) where it goes: a site-relative path or an http, https, mailto or tel URL.

{"name": "Open house",
 "message": "Open house this Saturday",
 "call_to_action": "See details",
 "url": "/open-house/"}

A banner shows nowhere until a page uses it: set banner on a content page, agent landing page, area page or the home page to its id, or to null to take it off. There is no site-wide banner; each page chooses. Editing a banner changes it on every page that shows it.

Undo: every change to a banner is a revision at /content/banners/<id>/revisions/, covering all of its fields; revert one to put it back. See Revisions and undo.

/api/v3/content/featured-pages/

The “Featured Pages” tile block on the anna-modern home page: a titled group of up to twelve tiles, attached to the home page through its tile_group. Scopes: home_page:*.

  • GET /featured-pages/, POST /featured-pages/ with {"title", "blurb"?, "tiles"?}.
  • GET/PATCH/DELETE /featured-pages/<id>/. PATCH takes title, blurb and/or a full tiles list. Deleting the group the home page uses is 409 unless ?force=true.
  • A tile’s link follows the navigation link rule (site-relative path or http/https/mailto/tel URL); image is a file URL without quotes, spaces or parentheses.
  • POST /featured-pages/<id>/tiles/ adds a tile; PUT .../tiles/ with {"tiles": [...]} reconciles the list (entries with id are kept and updated, others created, the rest deleted).
  • GET/PATCH/DELETE .../tiles/<tile_id>/ edit one tile.

A tile is {"id", "title", "link", "cta", "image"}: the name, the page path it links to, the button text, and an optional image URL.

Undo: every change to a featured pages group is a revision at /content/featured-pages/<id>/revisions/, covering its title, blurb and tiles; revert one to put it back. See Revisions and undo.

From the command line: geekcli featured list, geekcli featured add-tile <group> --title … --link … with geekcli (see the geekcli guide).