Skip to main content

# Predefined collections

The predefined collections are built-in collections ready to use for all users. The idea behind them is to give users a quick start with some well-known collections without necessity of creating them.

## Available collections

- History - automatic. Posts are added while browsing
- Read Later - manual. Posts are added by a user
- Favourites - manual. Posts are added by a user

## Visibility

All predefined collections are private. Each logged-in user has its own predefined collection and only the owner has access to it.

## Activate

To activate e.g. the History collection, please do as follows:

1. Go to the WP admin panel › Settings › Snax › Collections section
2. In the Built-in Collections section, click the Activate for the History collection
3. When collection is successfully activated, you should see the View and Edit buttons (screen)

## Welcome page

If an anonymous user tries to add a post to a predefined collection, they can only see the welcome page. Each collection has its own dedicated texts, below the History collection as an example.

The content of that page is from the `[snax_collection_intro]` shortcode. Shortcode texts can be translated. All phrases are from Snax plugin. Read here about translation mechanism.

You can also replace the shortcode with your own content by following these steps:

1. Go to the WP admin panel › Settings › Snax › Collections section
2. In the Built-in Collections section, click the Edit for the collection you want to change
3. Remove the `[snax_collection_intro]` from content
4. Add your texts
5. Save changes

## Create a collection

Once activated a collection is available for all users. User does't have to create it.

## Single collection

To allow users to access theirs predefined collections you have to use the menu endpoints. Read more.

## Edit

The predefined collection are common for all users. This results in some limitations.

User CAN:

- add items
- remove items

User CAN'T:

- edit collection (title, descriptions and image)
- delete collection

As a user's predefined collection "inherits" from "base" collection, only site's admin can edit it. To edit a predefined "base" collection, please do as follows:

1. Go to the WP admin panel › Settings › Snax › Collections section
2. In the Built-in Collections section, click the Edit button right next to the collection you want to edit
3. You will be redirected to the collection edition view
4. Set title (screen, point 1)
5. Set short description (screen, point 2)
6. Set long description (screen, point 3)
7. Set featured image (screen, point 4)

## Add items

To add an item (post) to a collection, please do as follows:

1. Click the Add to Favourites or Read Later link from:
   - Archive view - under each post you should find post's actions menu (screen, point 1)

   - Single view - at the end of the post content, you should find post's actions

2. If you are logged out, you will be redirected to collection's welcome page (see the Welcome page section).
3. In the top right page corner, you will see the notification (screen, point 2)

4. Click the collection's name in the notification box to go to the collection

The History collection is an exception. Posts are added to it automatically while user browsing them.

## Remove items

To remove item from collection, please visit its single page, expand item's actions (screen) and click the Remove from Collection link. Or use the Clear All button to remove all.

## Deactivate collection

Only published collections are active so if you want to deactivate a collection, please do as follows:

1. Go to the WP admin panel › Settings › Snax › Collections section
2. In the Built-in Collections section, click the Edit button right next to the collection you want to deactivate
3. You will be redirected to the collection edition view
4. As each collection is a post, you can:
   - deactivate it by changing status to "pending" or "draft"
   - remove it completely by deleting the post

## Menu endpoints

Each predefined collection has its own special menu item that you can add to any of your menus. You can for example add the History item to your primary navigation. Read more