If someone creates a Node called dog

then someone else creates a Node called Dog

then yet one more Dog

Drupal will path it out as

dog
dog-0
dog-1

using a Page title setip like

[page-title] Story | [site-name]

How would I pull the number into the page title to make it unique

thanks

Comments

kristen pol’s picture

You can use the Drupal SEO Friend module to help check for duplicate page titles as well as duplicate meta tags.

Kristen

kristen pol’s picture

One way to make these unique automatically would be to include the author's name in the page title. This is assuming the same author did not create 3 posts titled "dog"! ;) Another way would be to include the date/time stamp.

On the prevention side, you can use the Unique Field module to configure all your content types to avoid duplicate titles, other fields, and combinations of fields.

Kristen

kristen pol’s picture

Status: Active » Closed (fixed)

I just looked up the tokens available in Drupal 6 and there is the full url available:

[node-url]

In Drupal 7 and you could use:

[random:number]

to assign a random number at the end of the page title.

Or you can use:

[current-page:url:args:last]

Which presumably is the last part of the url (e.g. dog/dog-0/dog-1).

You can also define your own tokens in a custom module and then use that token in the path alias.

I'll close this as the issue is old and now there are a number of ways to deal with this in these comments.

Kristen