I need some assistance. I have been reviewing DivHunt’s youtube videos, and searching through topics here for the last 2 days.
I’m trying to setup tabs for my CMS collection - Think blog categories tabs, with articles connected as CMS for each category.
I’ve setup the CMS collection, and have setup categories as “Select” fields. I am able to connect the CMS and browse between tabs, but there are some issues.
The issue:
When adding articles to the same category, an entirely new tab is created with the same name - for each article published.
Example: I got 3 categories: News, Updates, Tech.
I post 3 articles about Tech, and now I got 3 Tech tabs with one article in each tab.
How do I ensure all articles under the same category falls and under the correct tab?
How do I ensure new tabs are not created of the same category?
What I imagine in happening is that your tab opener section is taking the content from all your articles to fill those tabs - NOT the list of possible content. I take it you’re using a dropdown selector for the field.containing ‘updates’ in the CMS?
If you keep building out your CMS that list of buttons will continue to grow to the size of your database/limit you set for hours many to display on a page.
What I would personally do is unlink the CMS from the tabs and manually add the descriptions for what you want to sort by - only using the source link for the cards below. I’d suggest this would go a long way to correcting the issue.
unsetting the CMS connection for the tabs category buttons, and manually adding the categories solves the issue with them generating duplicates.
The issue still persists with the articles not being sorted correctly under the selected tabs, even with conditional visibility.
The tabs should be able to handle sorting CMS items by conditional visibility easily.
I’ve done this many times on other platforms, but I am so far unable to find a solution on Divhunt for this.
Any tips, or ideas to test are greatly appreciated!
For anyone landing on this thread in the future, heres how you solve it:
Firstly, you need to create CMS collection for each tab. This is how I solved this issue effectively.
The tab structure:
Create the tabs “navigation” (Div) with a “tab opener” (Div) for each category. This is your tab menu.
Write the categories on the tabs “paragraph”.
Create the tabs “content” (Div) with a “tab content” (Div) for each category. This is your tab content.
Under “tab content”: create a link button, and connect the CMS source to this link button. These are your content cards, with the desired information.
Create the content such as title, cover image and such under the “link button” and connect the CMS items to the content.
The instructional video never explains that there is a need for a separate CMS collection for each category.
The better option (standard on web builders like Webflow) would be to be able to set a CMS field for categories, and enable tabs to be sorted by these. Coming from Webflow, this is where I got confused.
I think you might have come awry still, mate. I have several sites that don’t require splitting the CMS per category. I normally build one massive CMS, with a category field and the sort plugin then works off of that as intended.
I’d hate for you to make something up for the marketplace if it’s harder for people to integrate. There must be something else you’re not quite getting right, or I’m misunderstanding your structure - in which case, ignore me and accepy my apology
Firstly, thank you for explaining the setup and providing the example. I appreciate you taking your time assisting me finding best practice.
You are absolutely right, and after following this setup and the instruction video for simple filtering I was able to set the category tabs with data-filter.
I’ve unmarked my former post, and marked your post as the solution. I’ll continue to tinker to learn more about Divhunt, as its capabilities has far exceeded expectations.