Search

Hi all,

I’ve read all the available docs and searched the forums but still can’t find an answer to this (perhaps simple) question. I’m wondering how I structure my sections/data to achieve the below:

As an example say I want to create a site listing sports teams and sports players, which would be separate areas of the site.

What I’d like to do is link the two in a way so that when adding a sports player, I can select from a list of sports teams (Subsection manager seems to do a good job) but then select a date joined and a date departed (if applicable), which would appear on the page for that player; also, on the sports team page there would be a timeline-type listing of players. How would the sections handle this type of relationship, would you need to build an extra section?

Hope that makes sense, any help would be really appreciated

You’ll need a third section:

  • Teams (title, text etc.)
  • Players (name, dob etc.)
  • Movements (link to team, link to player, date joined, date left etc.)

Thanks for that phoque, had a feeling that might be the way to go

Would you recommend using Subset Manager to cross-link sections? If so, when adding a new member would you have a subset field to link Movements, then have a subset within that to link to Teams? Seems a bit odd to have a subset manager within another, and can’t imagine it working too well - perhaps I’m going about it wrong.

Thanks again

Would you recommend using Subset Manager to cross-link sections? If so, when adding a new member would you have a subset field to link Movements, then have a subset within that to link to Teams?

Based on Nils’ response, I would simply use the select box link field in the Movements section for both the link to the team and the link to player.

You may also want to check out the Bi-Link Field because if my memory serves me correct, it works a little better to connect entries from one entry to another and vice versa. I’m not sure about compatibility, however, with the latest version of Symphony.

I’d probably do what phoque suggested with three sections. But only two would be visible: Teams and Playes. In the Players section you’d have a Subsection Manager that links to Movements, however this section would only have a Select Box Link to Teams and the two date fields (no Player dropdown).

When editing a player you can then add as many movements as you wish. The very fact that they’re added through the Subsection Manager means they are assigned to that player, so no need to re-select the player when adding a movement. In the Subsection Manager options you will want to disable the “search” functionality so that movement entries cannot be shared between players.

Thanks a lot guys, going to give it a try this weekend.

I gave Nick’s suggestion a try over the week, and it works great. The only problem I’ve found is that the Subsection Manager doesn’t display the movements data, only the selected dates (though the formatting isn’t ideal).

I’m guessing this is because the team-name is selected from a select box link, is this a limitation or is there a different way of doing this?

I’ve attached a screenshot that hopefully explains what I mean

One slightly off-topic question, but is there a better way to handle dates to reduce editor input error? I was thinking perhaps a dropdown box for day, month, year but a) it would be much easier if they could be positioned in a row and b) I would have to populate these by hand (I think?)

Thanks a lot

Attachments:
Screen shot 2011-01-25 at 12.52.41.png

If you add a Reflection Field in to your section that you’re picking names in (with the Select Box Link), and reflect this entry, you should get a name you can use in the Subsection Manager. The Reflection Field can be hidden from the publish page, so you will only see it in the Subsection Manager.

If you want a real easy way to add dates and times, then may I suggest the Date Time extension from Nils, which gives a lovely user interface for adding dates, and less chance of formatting errors.

I’m guessing this is because the team-name is selected from a select box link, is this a limitation or is there a different way of doing this?

Yeah, could well be. I know you can concatenate field values for the SSM (Subsection Manager) reduced view but perhaps Select Box Links aren’t supported. You could perhaps try a Reflection Field in the section as well, the value of which is evaluated when you save an entry, so that you could concatenate the date and team into a single text field and show that. But it’d be nice not to have to do it.

is there a better way to handle dates to reduce editor input error

There is an extension called Calendar Overlay which adds a date picker overlay to date fields. I don’t know how nicely it would play within an SSM though, there may be styling conflicts. You may also be interested in the Date and Time field by Nils (author of SSM) which handles date ranges and shows a date/calendar picker too.

Damn, two minutes too late! Touché.

Thanks again guys, going to give both those suggestions a try! I did give the calendar overlay a go, but there was too much clicking back through years (a lot of selected dates will be at least 10 years ago)

Cheers

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details