Introduction
Creating custom pages for specific listing categories in eDirectory allows you to present targeted content and provide better navigation for your users. This is particularly useful if you want to highlight specific types of businesses or services, such as restaurants, shops, or services.
In this guide, we’ll walk through how to create a custom page that will display only listings from the "Restaurant" category, but you can follow the same steps for any other category you choose. To achieve this, you will need to create a specific page for each category you want to display.
Here’s how you can do it:
Step-by-Step Guide
Step 1: Create a Category
Before you create your custom page, ensure that the category you want to feature is created in your eDirectory system.
- Navigate to Content → Listings → Categories.
- Click Create Category and create your desired category. In our example, we will create a category called "Restaurant."
Step 2: Navigate to the Page Editor
Once your category is created, it's time to build the page that will display the listings within that category.
- Go to Design → Page Editor.
- Click on the Add New Page button to create a custom page.
Step 3: Name Your Custom Page
On the new page:
- Choose a name for your custom page. In this example, we'll name it Restaurants. You can customize the name based on the type of listings you want to display, such as "Shops" or "Services."
Step 4: Add a Widget to Display Listings
Now that your page is created, you’ll need to add a widget that will show the listings related to the chosen category.
- Click the Add Widget button on your new page.
- Scroll through the widget options and select Listings & Cards.
- Choose the Vertical Cards Widget to display your listings.
Step 5: Configure the Widget for Your Category
After adding the widget, type the following information :
- Widget title: Type the title intended for this widget, for example, "Restaurants".
- Pick a module to show on this widget: select the correct module this widget will pull the content from. In this case, choose "Listings".
- Columns: Select the number of columns this widget will display.
- Customize rules: Select this option to customize the display rules.
- From which product would you like to display these items: check the listing levels you would like to see displayed in this widget.
- Items displayed: Type the number of listings to be displayed in this widget.
- How would you like to order the results?: Choose two criteria to order your listings.
- Most importantly, make sure to set the category filter to display the listings from your desired category. For this example, select the Restaurant category.
This will ensure that only listings tagged under the "Restaurant" category are shown on the restaurant page.
Step 6: Save Your Changes
Once everything is configured:
- Click the Save Changes button at the top of the page to publish your custom category page.
Disclaimer: If you receive a "Slug URL already in use, please choose another slug" error when saving the page in the top right corner, it means the URL assigned to the page is already being used by a category.Since URLs in eDirectory must be unique, the system will not allow you to save the page with a duplicate URL. To resolve this, you’ll need to modify the page URL slightly to make it unique. One simple solution is to add an extra character, such as a dash ( - ), to the link, and save changes. For example:
Step 7: Link the Page to the Header Menu
After saving your page, you may want to link it to your site’s top header menu for easy navigation.
1. Stay within the Page Editor.
2. Locate the Header Widget and click to edit it.
3. Click on the + button to add a new link.
Note: If you don't see the + button in this section of your site, and instead see the page displayed like this: It’s likely that the Dropdown Menu plugin is active on your site. To link your custom page to the header menu when using the Dropdown Menu, follow these steps: 1. Navigate to Design → Navigation Menu in your site settings. 2. Configure the Dropdown Menu to include your new page. For detailed instructions on how to set up and manage the Dropdown Menu, refer to this article: Dropdown Menu - Version 13.5.
4. Click on the Gear Icon next to the new menu item.
5. Enter a name for the option to display in the header menu in the Page Title field, e.g., "Restaurants."
6. In the dropdown menu, select your newly created page ("Restaurants").
7. Save the changes to the header menu.
8. Finally, click Save Changes in the top-right corner of the page to apply your updates.
Conclusion
You’ve now successfully created a custom page that displays listings from a specific category and linked it to your site’s navigation menu. In our example, we created a Restaurants page that shows only restaurant listings, but you can follow these steps to feature any other category on your site.
Feel free to further customize your page by experimenting with different widgets and layouts to match your directory’s style and branding!