Responsive, mobile-friendly ‘View’ templates for book lists
3 out-of-the-box responsive, mobile-friendly Views to display book lists are readily available. All that needs to be done by the store staff are to edit the book lists and plug them into the views.
This feature provides 3 pages - Front Page Books 1, Front Page Books 2 and Front Page Books 3 and 3 blocks with the same names. The book lists from each of those 3 pages are pulled into views and displayed in the corresponding blocks. Though these view templates and blocks are named ‘Front Page’, they can be used for any pages on your website, like ‘Staff Picks’, ‘New and Noteworthy’ etc.
NOTE: This feature requires modules to be enabled for your site. If you have not previously requested we enable them for you please contact staff@bookweb.org [3]. We will send you confirmation once it has been enabled.
EDIT THE BOOK LISTS
Navigate to 'Content'
- Locate the Front Page Booklist content options - Front Page Booklist 1, Front Page Booklist 2, Front Page Booklist 3
- Select ‘Edit’ for Front Page Booklist 1
- Update the book list by adding and removing ISBNs. By default, up to 6 books will be displayed in this view
- Save
- Repeat steps 1-4 for Front Page Booklist 2 and Front Page Booklist 3
CONFIGURE THE VIEW BLOCKS
Navigate to Structure > Blocks
- Locate the Front Page Book block options - Front Page Booklist 1, Front Page Booklist 2, Front Page Booklist 3
- Select ‘Configure’ for Front Page Booklist 1
- Enter a 'Block Title' - Example: New and Noteworthy
- Save
- Repeat steps 1-4 for Front Page Booklist 2 and Front Page Booklist 3
CUSTOMIZE THE VIEW (INDIECOMMERCE MEMBERS ONLY)
Navigate to Structure > Views > Front Page Booklist
Prepare to make this change by retrieving the NID (node ID) of the page containing your booklist. This can be found in the URL for editing the node so click on Content > Find the page and click edit. Look at the URL and make note of the NID. Example: node/111/edit
CHANGE THE BOOKLIST BEING USED
- Select the Front Page Booklist you want to edit (Front Page Booklist 1, Front Page Booklist 2 or Front Page Booklist 3)
- Under ‘Filter Criteria’ select ‘Content: Nid’
- Replace the existing NID value with the new NID value
- Apply (this display)
- Save<
INCREASE THE NUMBER OF COVER IMAGES DISPLAYED
- Under ‘Pager’ select the number of items listed - Example: 6 items
- Change the number under ‘Items to display’
- Apply (this display)
- Save
Want to show all items?
- Under ‘Pager’ select ‘Display a specified number of items’
- Select ‘Display all items’ (we recommend the only if there are 20 or less items)
- Apply (this display)
- Save
ADD ADDITIONAL VIEW BLOCKS
- Select ‘clone Front Page Booklist 1’
- Select the ‘Display Name’
- Edit the name to be unique - Example: Front Page Booklist 4
- Apply
- Under ‘Filter Criteria’ select ‘Content: Nid’
- Replace the existing NID value with the new NID value
- Apply (this display)
- Save
You will now have an additional view block under Structure > Blocks that can be placed in a region of your choosing.
If you need assistance making additional customizations please contact us by emailing staff@bookweb.org [3]
SINGLE GRID (INDIECOMMERCE MEMBERS ONLY)
PREPARE TO CREATE YOUR VIEW
To prepare to create your view retrieve the NID (node ID) of the page containing your book list. You will need it for step 22 of creating your view. The NID can be found in the URL for editing the node”
Navigate to: Content
- Select ‘edit’ for the page that contains your book list
- Look at the URL and make note of the NID. Example: node/111/edit
If you haven’t created your book list yet and aren’t familiar with doing so instructions can be found under ‘Creating Booklists’
CREATE THE VIEW
Navigate to: Structure > Views > Add New Views
- Fill in ‘View Name” - Example: cookbook_bestsellers
- Fill in Description - Example: Cookbook Bestsellers
- Uncheck ‘Create A Page’
- Select ‘Create A Block’
- Enter Block Title - this should automatically fill in with your view name, if it does not, repeat it.
- Display format - select 'Responsive Grid' of 'fields'
- Set ‘Items per page’ - this should be the number of books you want to display (leave blank to display all)
- Select ‘Continue and Edit’
- Click on ‘Block’ under ‘Display Name’
- Enter name and description Example: (Cookbook Bestsellers Block, Grid of cover images) - click Apply
- Confirm ‘Format’ is set to ‘Responsive Grid'
- Select ‘Settings’ next to ‘Responsive Grid’
- Set the number of columns you want to be displayed by default - Example: 4 (this will automatically adjust on smaller devices, for instance, you may have it set to 4 but on a mobile device it may adjust to 2)
-
Expand ‘Column Classes’ and adjust the entries to:
- Every Column - views-column column
- First Column - views-column-first column
- Last Column - views-column-last column
-
Expand ‘Row Classes’ and adjust the entries to:
- Every Row - views-row row
- First Row - views-row-first row
- Last Row - views-row-last row
- Under Fields - Click Add
- Find ‘Content : Books’ in list - Select - Apply (this display)
- Configure Books - uncheck ‘Create a label’
- Select the appropriate ‘Formatter’ - Example: Product reviews - Cover Image Only
- Select 'Multiple Field Settings' - Uncheck ‘Display all values in same row’
- Apply (this display)
- Under fields click on ‘Content : Title’ - Remove
- Under ‘Filter Criteria’ Add - ‘Content: Type’ - Apply (this display)
- Select ‘Page’ under ‘Content Type’ - Apply (this display)
- Under ‘Filter Criteria’ Add - ‘Content : nid’
- Enter NID that you previously made note of from the Staff Picks page into the ‘Value’ field - Apply (this display), Example: 111
- Under Sort Criteria - confirm 'Content: Post date' is in place (this can be adjusted to your desired sort)
- Under ‘Footer’ select ‘Add’
- Select ‘Global Text Area’ - Apply this display
- Fill in the Label - Example: CSS
- Paste the following line into the text field: <br clear="all"> - Apply this display
- Save View
The Cookbook Bestsellers Block view is now ready, and will be available in the list of disabled blocks. You can activate this block from Structure > Blocks and place it in a suitable region.
NOTE: Responsive designs rely on consistent elements such as images that are the same size or height to display correctly. If after following these instructions your cover images aren’t aligning correctly, try shifting the order of the books around so that the longer covers images are the last in the list. If you need assistance, please email us.