0

I'm very new to Joomla, and I suspect that what I'm trying to do is very straightforward but I haven't been able to figure out how to do it, which probably means I'm looking in the wrong place.

Let's say I'm building a Joomla 4 website to hold information about British Cities and current Premiership football clubs. In RDBMS terms we have a Cities table and a Clubs table and a zero to many relationship between the two.

What I'd like is to be able to display a City and then expanding sections within the City page, one for each Club. Some Cities don't have any Club - that's fine. Some may have several - also fine. I'd like to make this all data driven, so that the Clubs just have a FK-like CityID, (rather than putting links into each City listing all its Clubs and a link into each Club identifying its City).

I'd also like the Clubs to be independent entities at some level so that a user could search by Club/show all Clubs founded in 1890s, that kind of thing, rather than just data within the Cities entries.

  • I think I should set up both Clubs and Cities as Articles within Joomla.
  • I think I distinguish those Articles by having separate Categories for Clubs and Cities - I can create a few custom fields on each Category, so Clubs can have founding dates and Cities can have population sizes.
But...

  • I don't know where to start with making the Clubs appear as nested "sub articles" within their Cities. In RDBMS this is a parent/child or master/detail form, but a few hours searching those kinds of terms in Joomla hasn't thrown anything useful up. The Clubs "sub articles" will need to be fully functioning articles, not just entries in a table, as they could include pictures, etc.

Any kind of steer much appreciated. E.g., is this do-able in native Joomla, is there a Module or Extension for it, is Joomla the right tool for this job.

2
  • I am confident that Joomla can handle this task, but this is a large, multipart question. Questions that are this broad typically end in 2 ways: either with extremely vague advice or no answers at all. If you need a developer, please find one and pay them. Otherwise, try to narrow your question to a smaller piece of this task. Commented Apr 17, 2023 at 19:59
  • Please take the tour. Even new users can accept answers.
    – isherwood
    Commented Jan 21 at 16:48

1 Answer 1

1

Categories and Articles are already a one-to-many relationship. Hence, make each city a category (under a parent category called City), and place the information about the city in the category description. Each club is an article assigned to a city category. The main pages are category blog layout or lists with the city description at the top and the clubs listed or linked below.

As for making a search find all clubs founded in the 1890s that is about 7 times more complicated.

1
  • Hi James thank you very much - that was exactly the level of input I needed. Unfortunately I don’t have enough reputation points here to upvote your answer, so gratitude is all I can offer. The bit about finding all clubs founded in a certain time was just to illustrate the point about the clubs being first class entities. The actual website is a really obscure subject matter - but Cities and Clubs gives exactly the right data model without needing lots of further explanation. Commented Apr 17, 2023 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.