ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Could use some guidance on setting up channels & categories for a travel website (2nd post)

April 23, 2012 10:14pm

Subscribe [2]
  • #1 / Apr 23, 2012 10:14pm

    stephencapp

    12 posts

    (Sorry, I also posted this in General but maybe this is a better spot?)

    Hi there. I’m using EE to build out a travel website. Since this is my first “real” site with EE I could use a little advice on how best to approach setting things up on the back end.

    I have a sample site of what I’m recreating in EE here:  http://cappcreative.com/staging/bigplanet/

    To cycle through the pages select Africa from the main nav dropdown, then Eastern Africa, then Cheetah Safari. So it’s basically Continent > Country > Trip.

    What I’m having a hard time wrapping my head around is how to best approach setting up my EE templates and channels.

    I’ve set up a channel for trips and I have set up all the categories and sub-categories on the back end. So for the online example above I’ve posted an entry called Cheetah Safari which I categorized under Eastern Africa which is a sub-category of Africa.

    Where I’m a bit lost is: should I create a Continent channel for the 8 Continents (Africa, Asia India etc) in addition to my Trips channel? When you select Africa from the main nav, would that go to a template that pulls in the Continent Channel info and the Trip channel info on a single page? There may be some Continents that don’t have any Countries or Trips as the site owners will be building the content out as they go along.

    Is that an efficient approach? Between Categories and Channels I’m a little unsure how to proceed. I’m also not entirely clear on how to pull these items into a single template.

    Any insight is appreciated.

  • #2 / Apr 24, 2012 1:06pm

    DCE Developer

    40 posts

    I’d think you’ll hear many opinions on to how to approach this.

    I particularly would do it with the categories only.

    You have a main category for each continent. Then you have a category for each country in that continent. Then you have entries that are related to each of the categories.

    There is no need to create a channel per continent. You’d have a channel for all the Trips. And a Channel for all the Geographical information or the general site.

    Under the general site, I’d create entries for each continent, region and country. with very detailed info. Then I’d have entries for each trip in the ‘Trips’ channel.

    Now, you’ll be able to link or relate trips back and forth.

    You can read about related_entries too, which may give you a more general idea.

    I’d then have a template for the country, which has nested segments for the region and then the country, then the entry_url would be the trip.

    Or you can have a continent template group, with a country template and a trip template.

    You can play with EE whichever way you may want. You’re the architect 😉

  • #3 / Apr 24, 2012 10:20pm

    stephencapp

    12 posts

    DCE - Thanks so much for your reply. Creating relationships seems to be the part that I was missing. I think I’m starting to understand how that that fills in the gaps.

    So if I understand what you’re saying, I would have a Geography channel and a Trips channel. In my Geography channel I would create individual entries for each continent and then entries for each country which I would relate to their specific continents. Then I would create entries in my Trips channel and relate each trip to its country. I would use categories to keep the content organized but displaying the content would be done through the related_entries tags in my templates.

    I can then use 3 templates to display the entries: one that shows the countries within a continent, another for the trips available for each country and a final template for the trip details.

    Have I got that right?

    I’ll set aside a few hours and do a little testing to put this into practice and see if it all makes sense!

  • #4 / Apr 25, 2012 10:54am

    DCE Developer

    40 posts

    Yes, that’s about it.

    The way to relate entries, is by creating a custom field in your Trips channel that establishes the relationship with the country.

    So create a custom field named ‘country’ or something similar, and then tie that custom field in relation to your countries.

    Ludvik

  • #5 / Apr 27, 2012 11:04pm

    stephencapp

    12 posts

    Well here’s how I’ve done it - I created separate channels for Continents, Countries and Trips. Continents is the parent of Countries which is the parent of Trips.

    So when you click on a Continent it will display its info and show the related countries. When you click one of the countries you will go to another page that will display the info for the country and the related trips.

    I installed the P&T Playa module which makes relating the multiple entries a breeze. I then added a Playa relationship field to the Continents and Countries. So far everything is working pretty good.

    Thanks for the tips - they’ve been very helpful.

  • #6 / Apr 30, 2012 10:41am

    DCE Developer

    40 posts

    Great to hear.

    P&T Playa is a fantastic module. Most of my sites have this module. Relationships are one of the strongest powers of databases, thus EE 😉

    Would be great to see your URL.

    Ludvik

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases