(note: this question was originally about Custom Fields, but @MikeSchinkel had a better solution involving Custom Post Types)
On my site I have several pages which I want to show the same data in the sidebar. For instance, in a structure like this:
-Home
-Cars
-Volvo 850 overview
-Volvo 850 tech spec
-Volvo 850 pictures
-Porsche 911 overview
-Porsche 911 tech spec
-Porsche 911 pictures
-Roads
-Route 66 overview
-Route 66 history
-Route 66 pictures
-Pan-American Highway overview
-Pan-American Highway history
-Pan-American Highway pictures
I would like all the Volvo 850 pages to show the same data in the sidebar, all the Porsche pages to show a different set of data (for instance Speed, Maker, etc).
The Road pages would have their own set of data for each road. Cars and Roads would also have there own page template, and the way I figure it would get the right sidebar is something like this within sidebar.php:
if ( is_page_template('car-profile-template.php') ) :
// show car widgets
Here's an example page, the Volvo 850 Pictures page. The same (left) sidebar should appear on the other Volvo 850 pages, while the stuff on the right is just page content.
| Home •Cars Roads |
--------------------------------------------------------
| Overview | Volvo 840 Pictures |
| Tech Spec | (some pics) |
| •Pictures | |
------------------ |
| -Specs- | |
| Volvo 850 | |
| Speed:150mph | |
| Maker:Volvo | |
| Download PDF | |
------------------ |
| -Rating- | |
| Style:3 | |
| Safety:5 | |
| Reliablity:4 | |
------------------ |
In this example, the two sidebar widgets, Specs and Rating should be getting their info from a Custom Post Type. Is there a method, which would be easy for the end-user to edit, which means that they would have to enter this custom data only once? It may not be necessary for each of the fields to be separate (ie all of Spec could be entered within an Editor field, and all of Rating could be put in Excerpt field.. maybe)