3

I have two vocabularies/fields, one called Days that has all the days of the week (Mon, Tues, Wedn...) as terms, and another vocabulary/field called Time of Day that has terms (Morning, Midday, Afternoon, Evening, Night, Late).

I'm hoping to use these vocabularies/fields for a type of opening hours style tagging, e.g. X venue is open Monday: Morning, Midday, and Evening, Saturday: Evening, Night, Late, etc.

I'm imagining a situation when I check the box next to 'Monday' the terms in the Time of Day field will become visible and I'll be able to check the 'Morning', 'Midday', and 'Afternoon' boxes. Likewise for when I check any other box next to another Day term.

Can you guys think of a way I could set this up with my field structures?

Thanks in advance!

EDIT: Hey guys, new aspect of this question now. So I'd like to attach tags to different day and opening hour combinations, e.g. Monday Morning X Venue is good for coffee, breakfast, Saturday Night at X Venue is good for cocktails, dancing.

I've currently got a vocabulary of tags. How can I go about linking the tags and the opening hours/days? A heirachy would be an option, but that would make for a hell of a lot of repeated clicking for the user. Any thoughts?

2
  • How do you intend to display this information once it has been recorded? As a list? Maybe an infographic?
    – Darvanen
    Mar 5 '15 at 1:01
  • It'll be as part of a venue profile. So for example 'Joe's Burgers is open Monday: Morning, Midday' etc.
    – Liam
    Mar 5 '15 at 1:13
3

To do a hierarchical taxonomy, Use Taxonomy Manager and all you need to do is include the hyphen before the child terms, as shown in the answer above when you bulk add terms

You can also use the standard taxonomy manager, and use drag handles to inset children, like I have done below.

enter image description here

1
  • +1, thanks for providing that info, hopefully with a couple more votes you will soon be able to comment =)
    – Darvanen
    Mar 5 '15 at 8:57
1

I would set this as a hierarchical taxonomy rather than two vocabs (hyphen indicates child term):

Monday
-Morning
-Midday
-Afternoon
Tuesday
-Morning
-Midday
-Afternoon

Simple Hierarchical Select will then give you the perfect widget for that too

1
  • That's really helpful, thanks! I'm struggling to set up a hierachial taxonomy though. Do you know how I would do this?
    – Liam
    Mar 5 '15 at 3:28
1

I'm not sure if I see a value of somehow connecting those two vocabularies ("Day" and "Time of Day"). They don't have to be connected in any way for the display to work properly. Both vocabularies can be displayed on the content type for creator to enter both "Day" and "Time of Day". As for display, they can be made to display in one line, with - or something, so to site visitors they appear as one value. Another reason I would keep those vocabularies separate is that if you want visitors to be able to find venue that is open any day of the week but only in the morning, having two vocabularies makes is very easy in, for example, Views to have two separate filters. That way visitors can select "morning" only without having to select the day. Similarly other way, visitors can select a day without having to specify the time of day, when they looking for something that happens any time during that day.

2
  • This is a good point. Currently I'm looking at using this structure for submitting a venue's information, but for the search option I agree two vocabularies would be better.
    – Liam
    Mar 6 '15 at 4:17
  • The only issue I see here is if a venue has erratic opening times, guess it depends on the needs of the OP.
    – Darvanen
    Mar 9 '15 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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