Reusable Location Content Type

This entry is part 26 of 37 in the series NA Service Body Site with Drupal 7

In our Event content type a manager has to input the address each time an event is posted which is going to be okay for the regional site with a lot of one off events but in small service bodies, ASCs or LSUs, often times the same locations are used for events.

I create a separate content type called Location and reference that type in an additional field on Event. Used the Entity reference module.

Since I ran out of time on the video I did not remove the Geofield and Address fields from the Event display. They are now hidden on both the Default and Teaser display.

Hidden fields

I am not sure if I will add this to the repo. If I do, there will have to be some documentation added to the code and distribution explaining the difference so webmasters can disable or delete unneeded fields.

This entry was posted in Learning Web Technology. Bookmark the permalink.

Comments are closed.