It would be nice with some documentation on how to install and use the Pathauto module. Here is some text to get us started, which could be added to the README.md file:

  1. Install the module as normal, note that there are two dependencies, the modules Chaos Tools and Token.
  2. Configure the module at admin/config/search/path/patterns - add a new pattern by clicking "Add Pathauto pattern".
  3. Fill out "Path pattern" with fx [node:title], choose which content types this applies to, give it a label (the name) and save it.
  4. When you save new content from now on, it should automatically be assigned an alternative URL.

Comments

raj45 created an issue. See original summary.

berdir’s picture

I personally find it to be rather useless documentation to say which dependencies you need. Drupal tells you that if you're missing them.

And the instructions on how to create patterns should IMHO at least also be added as a pathauto_help(), then we can make it context sensitive for the list and add pages.

raj45’s picture

I personally find it to be rather useless documentation to say which dependencies you need. Drupal tells you that if you're missing them.

I think it's valuable information, though. Perhaps it could be added to Pathauto main page?

pguillard’s picture

Status: Active » Needs review
StatusFileSize
new2.08 KB

I added this documentation to README.md and the hook_help, and removed a typo in the text and issue summary.

pguillard’s picture

Issue summary: View changes
berdir’s picture

Thanks or working on this. If you mention dependencies, I'd actually mention them, ctools and token.

Also, we don't need that part inside hook_help(), a user has already installed it.

Instead of describing where to go and what to do there, we should try to add some context specific help for the pattern overview and add form. Then it will be displayed on those pages, see how other help hooks do it.

pguillard’s picture

You are right.
I applied your suggestions except I didn't provide help for the pattern overview.

berdir’s picture

+++ b/src/Form/PatternEditForm.php
@@ -88,6 +88,7 @@ class PatternEditForm extends EntityForm {
       '#title' => $this->t('Pattern type'),
+      '#description' => t('Choose which content types this applies to.'),
       '#default_value' => $this->entity->getType(),

this is not about content types, it's about entity types. And theoretically, could also be about something different. I also think we don't need a description here, I think the values in the select explain themself. Having an example in the pattern definitely helps, though.

Note that that's not what I meant, what I meant is to have a help text for the overview and add page, not descriptions of the fields. I think the help text for the add page should explain that you have to select a pattern type, pattern and filter to what exactly it should apply (I'd try to avoid being too specific about languages/content types.. single-language sites won't see a language filter and some pattern types don't have bundles. And we might make this more flexible in the future.

berdir’s picture

To be clear, I'm thankful for anyone working on this. While issues like this seem easy at first, they're actually quite hard on a non-technical level. Writing good and useful documentation is *very* hard.

I'd also love to get feedback from new users and others. I'm definitely not the best person to judge about the help text I can only comment on the technical correctness. I'm working on an update in the contrib_tracker issue and I will point people to this issue and ask them to help out here.

pguillard’s picture

StatusFileSize
new2.58 KB

I know it is hard, especially as a non English native, so yes, feedback from others users is welcomed.

I suggest this patch, at least to get back to the right direction.

My suggestions here are :
Overview page (inspired from what I found on similar situations on core) :

This page provides a list of all patterns on the site and allows you to edit and reorder them.

Add page (from #8):

You need to select a pattern type, then a pattern and filter, and a label.

raj45’s picture

dermario’s picture

Status: Needs review » Needs work

I just stumbled over that issue and had a look on the latest patch.

+++ b/pathauto.module
@@ -49,6 +49,11 @@ function pathauto_help($route_name, RouteMatchInterface $route_match) {
+      $output .= '<h3>' . t('Configutation') . '</h3>';

This should be "Configuration".

peschmae’s picture

StatusFileSize
new808 bytes
peschmae’s picture

Status: Needs work » Needs review
StatusFileSize
new2.58 KB

I've fixed the typo mentioned in #12

  • Berdir committed fc35371 on 8.x-1.x authored by peschmae
    Issue #2657376 by pguillard, peschmae: Document installation and usage
    
berdir’s picture

Status: Needs review » Fixed

No feedback on the content, despite my call for help in the contrib_tracker issue. I guess that means this is fine and most users are able to figure out the UI themself.

Works for me, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.