thesis v0.0.28 Thesis.EctoStore

Thesis.EctoStore is the most commonly-used store for Thesis pages and content. It interfaces with the host application’s repo (which is provided in the config.exs of the host applicaton).

You can generally just use Thesis.EctoStore unless you’re not using Ecto in your project or you want to do something custom with how Thesis is handling its data.

Summary

Functions

Deletes a given page by slug

Retrieves a file by slug

Callback implementation for Thesis.Store.page/1

Retrieves a single %PageContent{} (or nil, if it doesn’t exist) based on page_id and name

Returns an existing %PageContent{} record or a newly created one with the provided page_id and name set

Handles `%Page{…}`` struct - means page has been edited and saved. Retrieves page content and global content

Updates a page and its page_contents and global content areas

Functions

delete(map)

Deletes a given page by slug.

file(slug)

Retrieves a file by slug.

page(slug)

Callback implementation for Thesis.Store.page/1.

page_content(page_id, name)

Retrieves a single %PageContent{} (or nil, if it doesn’t exist) based on page_id and name.

page_content_or_new(page_id, name, preloaded_contents)

Returns an existing %PageContent{} record or a newly created one with the provided page_id and name set.

page_contents(slug)

Handles `%Page{…}`` struct - means page has been edited and saved. Retrieves page content and global content.

update(page_params, contents_params)

Updates a page and its page_contents and global content areas.