Need Help! Connecting Tabs to CMS categories

Hi there!

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.

  1. How do I ensure all articles under the same category falls and under the correct tab?
  2. How do I ensure new tabs are not created of the same category?

Help is greatly appreciated!

Hello can you post some images here with additional description?

https://wytwornia-zieleni.pl/en/realizacje-ogrodow You mena like tabs on my site where you choose type of plot?

Hi W,
Nice to e-meet you!

Here’s an image where you can see the issue.

What I’ve done:

  1. I’ve created 2 articles in the “Updates” category.
  2. I’ve connected the Tab Opener to CMS and got the “Updates” tab in return.
  3. I’ve connected the Tab Content to CMS and got the article in return.

The issue:

  • The 2 articles are in two separate tabs.
  • 2 tabs of the same category is automatically created.

What I aim to do:

  • Having the articles sort themselves correctly under the correct category.
  • Ensure no duplicate category tabs are created.

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.

1 Like

Hi M,
Thank you for your reply.

Correct, I’m using the dropdown selector.

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!

Great news! I figured it out.

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:

  1. Create the tabs “navigation” (Div) with a “tab opener” (Div) for each category. This is your tab menu.
  2. Write the categories on the tabs “paragraph”.
  3. Create the tabs “content” (Div) with a “tab content” (Div) for each category. This is your tab content.
  4. 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.
  5. Create the content such as title, cover image and such under the “link button” and connect the CMS items to the content.

Mine looks like this:

Thank you all for your attention and support! This is such a great community.

I will provide a template on this setup soon, where you will be able to get it from the Divhunt store.

Glad you’ve got it sorted, but isn’t this essentially what’s explained in the instructional video?

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.

Here it is as a ‘blog style’ list which also includes visibility settings to exlude some of the items: Western Districts Hockey Club | News

Here’s an ‘information style’ one that also incorporates the search function for added refinement: Western Districts Hockey Club | Westie Businesses

Here’s a screenshot of the second one -

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

2 Likes

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.

2 Likes

I’m glad you got it working!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.