{"title":"Liquid Variables","slug":"liquid-variables","url":"https://support.storeconnect.com/articles/liquid-variables","url_markdown":"https://support.storeconnect.com/articles/liquid-variables.md","subtitle":null,"summary":"Two collection variable types are available in StoreConnect Liquid: List for in-memory collections and PaginatedList for server-side paginated results.","type":"Developer_Documentation","video_url":"","keywords":"liquid variables, liquid, list variable, paginatedlist, storeconnect liquid, liquid collections, liquid objects, in-memory list, paginated list, server-side pagination, theme development, liquid reference","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"StoreConnect Liquid provides two collection variable types for working with sets of records. Both are iterable with a `{% for %}` loop and share a common set of attributes (`first`, `last`, `size`, `any?`), but they differ in how and when records are loaded.\n\n## List\n\nA [List](list-variable-reference) loads all matching records into memory at once. It supports both integer index access (`list[0]`) and key lookup (`list[\"slug\"]`), making it straightforward to work with when the full result set is small or already scoped by the page context.\n\nUse a List when:\n- The collection is already bounded (e.g. a product's variants, a cart's items)\n- You need random access by index or key\n- The total record count is manageable in memory\n\n## PaginatedList\n\nA [PaginatedList](paginatedlist-variable-reference) fetches records server-side, one page at a time. Integer index access is not supported — only key lookup and iteration over the current page. Use it with the `{% paginate %}` tag to control page size and render navigation controls.\n\nUse a PaginatedList when:\n- The collection can grow large (e.g. a full product catalog, order history)\n- You need pagination controls in the template\n- Loading all records at once would hurt performance\n\n:::tip\nMost built-in collections exposed by Liquid objects (such as `collection.products`) are PaginatedLists. Wrap them in a `{% paginate %}` block to control how many records load per page.\n:::\n\n## Other variables in scope\n\nBeyond these collection types, a template can read variables that StoreConnect\nsets for you:\n\n- [Global variables](global-variables) — values present in every template, such as the current store, page, and request\n- [Liquid session variables](liquid-session-variables) — per-visitor state that persists across requests"}