Create a block that rotates a randomly-chosen book from the Staff Picks page.
CREATE A PAGE
Navigate to: Content > Add Content > Page
-
Fill in ‘Name’ - Example: ‘Staff Picks’
-
Enter ISBNs for staff picks (we recommend starting with at least 2)
-
Save
IMPORTANT NOTES BEFORE STARTING YOUR VIEW SETUP:
-
Retrieve the NID (node ID) of the page (Staff Picks), you will need it for step 23 of creating your view. This can be found in the URL for editing the node so click on Content > Find the ‘Staff Picks’ page and click edit. Look at the URL and make note of the NID. Example: node/111/edit
-
We highly recommend you save your 'view' after every step, as you create it. Especially when you see this message come up: “* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard the view.”
-
When working in settings, always change the ‘For’ option from ‘All Displays’ to ‘This block (override)’ so that the changes you make only alter the block (or page) you are working on.
CREATE THE VIEW
Navigate to: Structure > Views > Add New Views
-
Fill in Description - Example: Staff Picks Block
-
Fill in ‘View Name” - Example: staff_picks_block
-
Uncheck ‘Create A Page’
-
Select ‘Create A Block’
-
Enter Block Title should automatically fill in with your view name, if it does not, repeat it.
-
Display format - leave it as ‘unformatted list’ of ‘titles (linked)’
-
Set ‘Items per page’ to 1
-
Select Continue and Edit
-
Click on ‘Block’ under ‘Display Name”
-
Enter name and description Example: (Staff Picks Block, Block for providing rotating staff picks) - click Apply
-
Confirm ‘Format’ is set to ‘Unformatted list’ and its settings have ‘Add views rows classes and Add striping (odd/even), first/last row classes’ selected.
-
Click Apply (this display)
-
Under Fields - Click Add
-
Find ‘Content: Books’ in the list - Select - Apply (this display)
-
Configure Books - uncheck ‘Create a label’
-
Select the appropriate ‘Formatter’ (for this example we are using ‘Basic - Without Buy Button'
-
Multiple Field Settings - Uncheck Display all values in the 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 - Add - ‘Global - Random’ - Apply - Apply (this display)
-
Under Sort Criteria - Click on - Content Post Date - Remove
-
Save View
The Staff Picks Block view is now ready and will be available in the list of blocks. You can activate this block from Structure > Blocks and place it in a suitable region.
MULTIPLE STAFF PICK PAGES
Create a block that rotates a randomly-chosen book from each staff member pick page.
CREATE A PARENT BOOK PAGE
Navigate to: Content > Add Content > Book Page
-
Fill in ‘Name’ - Example: ‘Staff Picks’ - This will be the 'Parent' book page.
-
Select the tab ‘Book Outline’ - Change ‘Book’ option to ‘Create New Book’
-
Save
CREATE A CHILD BOOK PAGE(S)
Navigate to: Content > Add Content > Book Page
-
Fill in ‘Name’ - Example: ‘Staff Picks by Ryan’ - This will be the 'Child' book page.
-
Enter ISBNs for staff picks (We recommend starting with at least 2 picks for each staff page)
-
Select the tab ‘Book Outline’ - Change ‘Book’ option to ‘Staff Picks - ‘Parent Item’ should automatically change to match.
-
Save
IMPORTANT NOTES BEFORE STARTING YOUR VIEW SETUP:
-
Retrieve the NID (node ID) of the parent book page (Staff Picks), you will need it for step 25 of creating your view. This can be found in the URL for editing the node so click on Content > Find the ‘Staff Picks’ book page and click edit. Look at the URL and make note of it the NID. Example: node/105/edit
-
We highly recommend you save your 'view' after every step, as you create it. Especially when you see this message come up: “* All changes are stored temporarily. Click Save to make your changes permanent. Click Cancel to discard the view.”
-
When working in settings always change the ‘For’ option from ‘All Displays’ to ‘This block (override)’ so that the changes you make only alter the block (or page) you are working on.
CREATE THE VIEW
Navigate to: Structure > Views > Add New Views
-
Fill in ‘View Name” - Example: staff_picks_block
-
Fill in Description - Example: Staff Picks Block
-
Uncheck ‘Create A Page’
-
Select ‘Create A Block’
-
Enter Block Title should automatically fill in with your view name, if it does not, repeat it.
-
Display format - leave set as ‘unformatted list’ of ‘titles (linked)’
-
Set ‘Items per page’ to 1
-
Select Continue and Edit
-
Click on ‘Block’ under ‘Display Name”
-
Enter name and description Example (Staff Picks Block, Block for providing rotating staff picks) - click Apply
-
Confirm ‘Format’ is set to ‘Unformatted list’ and its settings have ‘Add views rows classes and Add striping (odd/even), first/last row classes’ selected.
-
Click Apply (this display)
-
Under Fields - Click Add
-
Find ‘Content: Books’ in the list - Select - Apply (this display)
-
Configure Books - uncheck ‘Create a label’
-
Select the appropriate ‘Formatter’ (for this example we are using ‘ Basic - Without Buy Button'
-
Multiple Field Settings - Uncheck Display all values in the same row
-
Apply (this display)
-
Under fields click on ‘Content: Title’ - Remove
-
Open the Advanced Tab - Relationships - Add - Select ‘Book: Parent’ - Apply (this display)
-
Select ‘Require this relationship’ - Apply (this display)
-
Under ‘Filter Criteria’ Add - ‘Content: Type’ - Apply (this display)
-
Change relationship to ‘Book parent’ and ‘Content Type’ to ‘Book page’ - Apply (this display)
-
Under ‘Filter Criteria’ Add - ‘Content: nid’
-
Change relationship to ‘Book parent’ - enter NID that you previously made note of from the Staff Picks page into the ‘Value’ field - Apply (this display) Example: 105
-
Under Sort Criteria - Add - ‘Global - Random’ - Apply - Apply (this display)
-
Under Sort Criteria - Click on - Content Post Date - Remove
-
Save View
The Staff Picks Block view is now ready and will be available in the list of blocks. You can activate this block from Structure > Blocks and place it in a suitable region.