Configure directory component for Dashboard template
In this guide, we'll walk you through step by step on how to set up the directory component used in Directory templates and components.
Use spreadsheets with up to 2500 rows. Otherwise the page loading speed will critically decrease, potentially leading to complete freezing.
Table of contents:
Create your spreadsheet
Publish and get a link to the spreadsheet
Replace the link
Add dynamic data source URL to the page
Additional information
Make a copy of the spreadsheet available at the following link:
https://docs.google.com/spreadsheets/d/198Wywl-achpHVm7ouuqinDbQlwqJ8E3O49f91GysiWQ/edit?usp=sharing
Remember: Each column of information in your Google spreadsheet should have a name to avoid errors on the site.
Publish your new spreadsheet as a .csv file and copy the resulting link:
Go to the Directory component settings:
and replace the link in the CMS URL section:
If the template you've chosen consists of multiple pages, you'll need to update the links to the spreadsheet in the dynamic component on each page.
We have a detailed guide and video Dynamic data from Google Sheets spreadsheet that walks you through setting up dynamic pages step by step.
The template has one dynamic page named /tools
And we need to select this page, then go to the page settings and add the Google Sheet link in .csv (which we previously added for the dynamic component) into the Dynamic data source URL section.
You can now start editing your Google Drive spreadsheet by adding your information.
All the changes you make will be automatically updated in the component on your website within a few minutes after the modifications are made.
Information on the item card
Description of columns in the standard Sheet
Component settings
Title and Text - provide purely informational content.
URL - the complete link to the website to which the user will be redirected after clicking the card.
In spreadsheet the link should start with https://
Category - determines in which tab of the switcher the card will be displayed.
You can add categories to the spreadsheet while preserving punctuation, i.e., by adding a symbol " ; " after the category name.
Hide - if you select "Visible if hide is FALSE" in the component settings under "Filter items by fields", the card for which this checkbox is set will not be displayed on the page.
Rank - determines the card's position when displayed on the page - the higher the rating, the higher the card will appear.
imgUrl - the direct link to the image should include the file extension at the end, such as .jpg, .png, etc.
If you are using a component without images, you can leave this field empty.
Search bar - Placeholder text for the search bar. Use {{ amount }} to display the total number of items in the directory. Leave empty to hide the search bar.
Item limit - Sets the maximum number of items to display initially. Additional items will be accessible via a "Show all" button.
Button text - the text displayed on the button that reveals all items when clicked. Leave empty to hide the button.
Tags field - Specify the field in your data that contains tags in this format: "tag1;tag2;tag3". Use visibility button to hide the tags bar.
Filter items by tags - Keep only selected tags. The tags bar is hidden if only 1 tag is selected. Switch "All" and "Any" to change the logic for multiple tags.
Filter items by fields - Display items only if they match certain conditions. The value is considered FALSE if it's empty or 'false'. Otherwise, it's TRUE. Switch "All" and "Any" to change the logic for multiple fields.
Sort by - Specify the field to sort the items by. Select ascending order to display the items from A to Z or from 0 to 9. Select descending order to display the items from Z to A or from 9 to 0.
Items URLs - Specify which URLs will be opened when you click on the directory items. Choose the field in your CMS that contains the URL. Add a prefix to open a dynamic page (e.g. /tools/unicornplatform).
Use spreadsheets with up to 2500 rows. Otherwise the page loading speed will critically decrease, potentially leading to complete freezing.
Table of contents:
Configure directory component
Create your spreadsheet
Publish and get a link to the spreadsheet
Replace the link
Configure dynamic page
Add dynamic data source URL to the page
Additional information
1. Create your spreadsheet
Make a copy of the spreadsheet available at the following link:
https://docs.google.com/spreadsheets/d/198Wywl-achpHVm7ouuqinDbQlwqJ8E3O49f91GysiWQ/edit?usp=sharing
Remember: Each column of information in your Google spreadsheet should have a name to avoid errors on the site.
2. Get a link to the spreadsheet
Publish your new spreadsheet as a .csv file and copy the resulting link:
3. Replace the link
Go to the Directory component settings:
and replace the link in the CMS URL section:
If the template you've chosen consists of multiple pages, you'll need to update the links to the spreadsheet in the dynamic component on each page.
At this stage, the setup of the dynamic component is complete and we can move on to configuring the dynamic page.
We have a detailed guide and video Dynamic data from Google Sheets spreadsheet that walks you through setting up dynamic pages step by step.
4. Add dynamic data source URL
The template has one dynamic page named /tools
And we need to select this page, then go to the page settings and add the Google Sheet link in .csv (which we previously added for the dynamic component) into the Dynamic data source URL section.
🏁 Setup complete!
You can now start editing your Google Drive spreadsheet by adding your information.
All the changes you make will be automatically updated in the component on your website within a few minutes after the modifications are made.
Additional information
Information on the item card
Description of columns in the standard Sheet
Component settings
An example of displaying information from a Google Sheet in a card on the website.
The spreadsheet contains the following information
Title and Text - provide purely informational content.
URL - the complete link to the website to which the user will be redirected after clicking the card.
In spreadsheet the link should start with https://
Category - determines in which tab of the switcher the card will be displayed.
You can add categories to the spreadsheet while preserving punctuation, i.e., by adding a symbol " ; " after the category name.
Hide - if you select "Visible if hide is FALSE" in the component settings under "Filter items by fields", the card for which this checkbox is set will not be displayed on the page.
Rank - determines the card's position when displayed on the page - the higher the rating, the higher the card will appear.
imgUrl - the direct link to the image should include the file extension at the end, such as .jpg, .png, etc.
If you are using a component without images, you can leave this field empty.
Component settings
Search bar - Placeholder text for the search bar. Use {{ amount }} to display the total number of items in the directory. Leave empty to hide the search bar.
Item limit - Sets the maximum number of items to display initially. Additional items will be accessible via a "Show all" button.
Button text - the text displayed on the button that reveals all items when clicked. Leave empty to hide the button.
Tags field - Specify the field in your data that contains tags in this format: "tag1;tag2;tag3". Use visibility button to hide the tags bar.
Filter items by tags - Keep only selected tags. The tags bar is hidden if only 1 tag is selected. Switch "All" and "Any" to change the logic for multiple tags.
Filter items by fields - Display items only if they match certain conditions. The value is considered FALSE if it's empty or 'false'. Otherwise, it's TRUE. Switch "All" and "Any" to change the logic for multiple fields.
Sort by - Specify the field to sort the items by. Select ascending order to display the items from A to Z or from 0 to 9. Select descending order to display the items from Z to A or from 9 to 0.
Items URLs - Specify which URLs will be opened when you click on the directory items. Choose the field in your CMS that contains the URL. Add a prefix to open a dynamic page (e.g. /tools/unicornplatform).
Updated on: 30/08/2024
Thank you!