Taxonomy provides for the categorization of content on a site. Groups of terms are created (vocabularies) and these terms can be applied to nodes when creating/editing.
Term names are available as tokens when determining pathauto settings, and taxonomy terms provide default views for all nodes categorized with the respective term. The default taxonomy term view may be overridden, see taxonomy_term at admin/build/views.
Try creating a vocab for region and "North America," etc as terms. Views of nodes categorized with these regions will exist by default -- you should see links at the bottom of each node (depending on your theme). Then use the pathauto settings with the term tokens to rewrite the node URLs.
On Wed, Jan 5, 2011 at 8:42 AM, Andrew Manson andrewm@graticule.com wrote:
field_region is just a text field. It has a fixed number of possible values (input as a drop-down box).
You mention that taxonomy might have a better solution for this problem, I am not really that familiar with taxonomy so is there any chance you could describe the "simpler solution" you mentioned.
Thank you.
- A
On 01/04/2011 04:54 PM, Carl Wiedemann wrote:
What type of field is field_region? You may have better luck if field_region is a nodereference field, where the regions are nodes and the product nodes refer to the region nodes. Views attach http://drupal.org/project/views_attach may be of use to show products for a given region or vice versa.
A simpler solution could be to use taxonomy instead.
On Tue, Jan 4, 2011 at 10:44 AM, Andrew Manson andrewm@graticule.comwrote:
Hi all,
I have already asked this "quick" question in the IRC but even while I was typing it I felt it was more mailing list material... Right here goes:
I have some path aliases set up using PathAuto where the url will be of the form: data_products/[field_region-raw]/[title-raw] . This comes out in the format data_products/namerica/product1 when viewing the node. The data_products/ url is actually a view and the [field_region-raw] acts as a view argument so going to data_products/namerica would so all products in north america.
What I would to have is a Menu Item "North America" that will be highlighted when you go to the url data_products/namerica/ and the url data_products/namerica/product1 .
I have been looking around Google quite a bit but I can't find anything that meets my needs but I think that I just have a lack of understanding and don't really know what I should be looking for. Can anyone point me in the right direction?
Regards,
- Andrew
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]