You are here

README.txt in View Alias 7

Same filename and directory in other branches
  1. 5 README.txt
  2. 6.2 README.txt
  3. 6 README.txt
VIEW ALIAS

This module aids in the bulk creation and deletion of SEO friendly view aliases.

In the past, I've worked on several sites that utilize a single view which takes
in a one taxonomy term id to display a list of related items.  And, on these
sites maintaining the URL aliases for them was a pain to do by hand, so I wrote
this module to do the repetition for me.

    - Eric Mckenna, Phase2 Technology

Views Alias was critical to the success of some Drupal 6 sites I put together,
so when I started to work on some Drupal 7 sites with similar needs, I reached
for Views Alias.  To my dismay, I found no Drupal 7 version and only a single
pending patch to create a baseline D7 port.  Eric was kind enough to grant me
co-maintainer status on the module and I spent a couple weeks updating it for
Drupal 7 and adding features requested in the issue queue.  What you see here
is the results of that effort.

    - John Franklin, Sentai Digital

SETUP
1. untar the tarball into your drupal modules directory
2. enable the module
3. visit admin/config/search/path for configuration options.

Generating Aliases
View Alias is integrated with pathauto, (admin/config/search/path).  So, expand
the "View Alias Paths" settings fieldset to select the views to alias.

Steps to make a view available to view_alias:
1. View must exist and have a page display.
2. Under Arguments, View must have one or more arguments (Contextual Filters) of
  "Content: Has taxonomy term ID" or "Content: Has taxonomy term ID (with depth)"
3. Check "Specify validation criteria"
4. Under "Validator" options:
  a. Set "Validator" to "Taxonomy Term", then select your term vocabularies.
  b. Set "Filter Value Type" to "Term ID"

In the 7.x version, the views are listed and a text field is provided to
specify the alias pattern.  Views generates machine names for each argument
(e.g., tid, tid_1), which need to be referenced in the alias pattern so Pathauto
can pass it to token_replace() to generate the aliases.  Views Alias provides
token prefixes of the form [view_alias:argument_machine_name?:?] for each
argument and passes the rest down to the standard taxonomy tokens.

For example, if you want use the term name of the tid argument, you would use
the token [view_alias:tid:term:name].  To use all the parent terms joined with
a slash (/), you would use [view_alias:tid:parents:join:/].  To prefix the term
name with the machine name of the vocabulary, use the pattern:

    [view:alias:tid:term:vocabulary:machine_name]/[view:alias:tid:term:name]

Any of the tokens listed in the Taxonomy Term Paths Replacement Patterns list
are available.

The text field for each view has a "default" listed below it that can be
copy/pasted into the text field to provide direct term name replacements of
the arguments in the views path.

Leaving a text field blank will disable aliasing for that view.

Not (yet) supported:
- Multiple value term arguments (e.g. my-view/12+34)
- NIDs or UIDs

7.x version:
John Franklin, Sentai Digital
franklin@sentaidigital.com

6.x version:
Eric Mckenna, Phase2 Technology
emckenna@phase2technology.com

File

README.txt
View source
  1. VIEW ALIAS
  2. This module aids in the bulk creation and deletion of SEO friendly view aliases.
  3. In the past, I've worked on several sites that utilize a single view which takes
  4. in a one taxonomy term id to display a list of related items. And, on these
  5. sites maintaining the URL aliases for them was a pain to do by hand, so I wrote
  6. this module to do the repetition for me.
  7. - Eric Mckenna, Phase2 Technology
  8. Views Alias was critical to the success of some Drupal 6 sites I put together,
  9. so when I started to work on some Drupal 7 sites with similar needs, I reached
  10. for Views Alias. To my dismay, I found no Drupal 7 version and only a single
  11. pending patch to create a baseline D7 port. Eric was kind enough to grant me
  12. co-maintainer status on the module and I spent a couple weeks updating it for
  13. Drupal 7 and adding features requested in the issue queue. What you see here
  14. is the results of that effort.
  15. - John Franklin, Sentai Digital
  16. SETUP
  17. 1. untar the tarball into your drupal modules directory
  18. 2. enable the module
  19. 3. visit admin/config/search/path for configuration options.
  20. Generating Aliases
  21. View Alias is integrated with pathauto, (admin/config/search/path). So, expand
  22. the "View Alias Paths" settings fieldset to select the views to alias.
  23. Steps to make a view available to view_alias:
  24. 1. View must exist and have a page display.
  25. 2. Under Arguments, View must have one or more arguments (Contextual Filters) of
  26. "Content: Has taxonomy term ID" or "Content: Has taxonomy term ID (with depth)"
  27. 3. Check "Specify validation criteria"
  28. 4. Under "Validator" options:
  29. a. Set "Validator" to "Taxonomy Term", then select your term vocabularies.
  30. b. Set "Filter Value Type" to "Term ID"
  31. In the 7.x version, the views are listed and a text field is provided to
  32. specify the alias pattern. Views generates machine names for each argument
  33. (e.g., tid, tid_1), which need to be referenced in the alias pattern so Pathauto
  34. can pass it to token_replace() to generate the aliases. Views Alias provides
  35. token prefixes of the form [view_alias:argument_machine_name?:?] for each
  36. argument and passes the rest down to the standard taxonomy tokens.
  37. For example, if you want use the term name of the tid argument, you would use
  38. the token [view_alias:tid:term:name]. To use all the parent terms joined with
  39. a slash (/), you would use [view_alias:tid:parents:join:/]. To prefix the term
  40. name with the machine name of the vocabulary, use the pattern:
  41. [view:alias:tid:term:vocabulary:machine_name]/[view:alias:tid:term:name]
  42. Any of the tokens listed in the Taxonomy Term Paths Replacement Patterns list
  43. are available.
  44. The text field for each view has a "default" listed below it that can be
  45. copy/pasted into the text field to provide direct term name replacements of
  46. the arguments in the views path.
  47. Leaving a text field blank will disable aliasing for that view.
  48. Not (yet) supported:
  49. - Multiple value term arguments (e.g. my-view/12+34)
  50. - NIDs or UIDs
  51. 7.x version:
  52. John Franklin, Sentai Digital
  53. franklin@sentaidigital.com
  54. 6.x version:
  55. Eric Mckenna, Phase2 Technology
  56. emckenna@phase2technology.com