7 replies [Last post]
worldfallz@drupal.org's picture
Offline
Joined: 07/22/2008
Juice: 5
Was this information Helpful?

I'm setting up my first UC site and though I'm not new to drupal, I've already hit my first stumbling block as I try to understand how all the pieces fit together.

There appear to be 3 uc related pathauto settings I need to concern myself with:

  1. 'product' pattern in the node path settings fieldset
  2. 'catalog' patten in the taxonomy term path setting fieldset and
  3. 'catalog pages' pattern in the catalog path settings fieldset.

I would have thought I would want to do something like:

  1. product node pattern: catalog/[vocab-raw]/[catpath-raw] and
  2. catalog taxonomy pattern: catalog/[vocab-raw]/[catpath-raw]
  3. catalog pages pattern: ???

I guess my confusion stems from having both catalog taxonomy and catalog pages settings. Since the catalog is implemented through a taxonomy vocabulary, what is the difference between the two? What are the recommended settings for these 3 patterns?

I spent quite a bit of time searching here and on d.o, but I couldn't locate any info on the 'best practice' for these settings.

Any suggestions and/or info would be greatly appreciated.

Thanks.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: pathauto settings best practice?

The taxonomy patterns and the catalog patterns replace two different URLs. The taxonomy module and uc_catalog module both have a hook_menu() implementation which creates pages in the Drupal site. Taxonomy creates the page that lists all of the nodes in that term (taxonomy/term/[tid]), and uc_catalog creates the catalog pages (catalog/[tid]/[term-name]). Now, since the catalog is also a vocabulary, those taxonomy terms have two URLs associated with them.

Usually, the taxonomy URL for the catalog terms is not seen because uc_catalog alters the link to the catalog terms on the products' tag list. This link now goes to the catalog URL instead. As far as I know, the only other place that lists the taxonomy URLs is the admin page for each vocabulary.

Since those are two different URLs, they shouldn't be given the same alias.
1. Product path settings: catalog/[catpath-raw]/[title-raw]
2. Taxonomy settings: category/[vocab-raw]/[catpath-raw]
3. Catalog settings: [vocab-raw]/[catpath-raw]

Since the catalog vocabulary is "Catalog" you can use "[vocab-raw]" or "catalog" or change the vocabulary name.

worldfallz@drupal.org's picture
Offline
Joined: 07/22/2008
Juice: 5
thanks!

This is exactly what I needed to know. Thanks for the clear concise explanation.

CJack's picture
Offline
Joined: 04/11/2011
Juice: 5
TWO places for the Catalog patern ??

Hi Lyle ...

I am using UberDrupal to learn about UC and Drupal ... funny how that works .. and one of the first things I had to do was install PathAuto ... Using the patterns you provided above makes sense BUT there is a problem:

There are two places on /admin/build/path/pathauto for the Catlog path. By default PathAuto looks like this (line numbers added by me for discussion):

1 - * NODE PATHS
2 - Default path pattern (applies to all node types with blank patterns below): [ __ content/[title-raw] __ ]
3 - Pattern for all Page paths: [ ____ ]
4 - Pattern for all Product paths: [ ____ ]

5 - * TAXONOMY TERM PATHS
6 - Default path pattern (applies to all vocabularies with blank patterns below): [ __ category/[vocab-raw]/[catpath-raw] __ ]
7 - Pattern for all Catalog paths: [ ____ ]

8 - * CATALOG PATH SETTINGS
9 - Pattern for catalog pages: [ __ catalog/[catpath-raw] __ ]

It is obvious that I should change the patterns on lines #4 and #9 as per your posting, and pattern #6 seems to be OK to start with, but what about line number 7 ("Pattern for all Catalog paths") ? If I leave that empty then won't it use pattern #6 by default or am I just totally mixed up on all this ?

dvancamp's picture
Offline
Joined: 02/03/2010
Juice: 10
Re: TWO places for the Catalog patern ??

Were you actually able to use that product page path for #4 above?
It doesn't appear that [catpath-raw] would be available to a node as a token. That's a token for the taxonomy.

I'm looking for:
The top level page (vocabulary) - catalog/
The category listing (vocabulary) - catalog/category-path
The product page (node) - catalog/category-path/product-title

So the breadcrumb navigation on the product page will allow them to easily move back to the category from which they navigated. It doesn't appear that the node can access taxonomy tokens.

end user's picture
Offline
Joined: 01/11/2008
Juice: 1198
Re: Re: TWO places for the Catalog patern ??

This is what I got and have used on several UC sites. I usually rename the catalog vocab to products/ or sop and I also use Taxonomy Breadcrumbs module.

Node Path Settings
Pattern for all Product paths: products/[termpath-raw]/[title-raw]
Pattern for all Product kit paths: products/[termpath-raw]/[title-raw]

Taxonomy term path settings
Pattern for all Products paths: products/[catpath-raw]

Catalog path settings
Pattern for catalog pages: products/[catpath-raw]

dvancamp's picture
Offline
Joined: 02/03/2010
Juice: 10
Re: Re: Re: TWO places for the Catalog patern ??

[termpath-raw] worked for me on the product nodes. Thanks for the tip end user.

The taxonomy_breadcrumb kept bringing me back to taxonomy lists instead of the catalog listing; the regular breadcrumb did fine for my purpose.

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1057
Hey guys, I have been using

Hey guys,

I have been using [termpath-raw]/[title-raw] for as long as I can remember, and recently it has begun messing up.

When I edit a product, for instance /apparel/hats/beenie and then save it, pathauto changes my nice path to a node number - title instead, like this: /100/beenie

I haven't changed anything with pathauto. In fact it took me a good 5 mins just to remember where it is in my admin section. I also have a test version of my site on our local server here and it has the same setting, [termpath-raw]/[title-raw].

I checked when the last time I updated pathauto and it was November 9th. Is anyone else experiencing this? Did "termpath" get redefined recently?

Any suggestions or tips welcomed.

Thanks!
BigMike