Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By rupald on
Sample book structure:
Book Name
--1 Category
----1.1 Category
------1.1.1 Category
--2 Category
So for example for "1.1.1 Category" node the link should be
Book Name/1 Category/1.1 Category/1.1.1 Category
Right now I have got:
[node:book:root]/[node:book:title]
But this does not print the sub categories present in between. Is there any pattern where pathauto can generate the complete ancestral categories?
Comments
I don't have a D7
I don't have a D7 installation in front of me with the book module installed, but with D6 the token you would want is [bookpath-raw]. That would give you the full path.
-
@foggyperspectiv | foggyperspective.com (blog)
Did you manage to solve this
Did you manage to solve this issue?
I'm having the same right now.
X2 - I am also having this
X2 - I am also having this problem.
Can anyone suggest a way to create a URL patten which will accomplish this, regardless of hierarchy level?
If not by using the provided tokens, how else would this be accomplished.
Thanks, Ali..
(first drupal.org comment - woop)
I bumped into the same
I bumped into the same problem, I wanted a URL path like shows/specific-show/venues/specific-venue.
What worked for me was [node:book:parents:join-path]/[node:title]
Pathauto alieses for Book Module
You can try simply this URL alias from Pathauto module:
[node:book:parents:join-path]/[node:book:title].html
Doing so you'll get:
bookname => /bookname.html
--category1 => /bookname/category1.html
----category1.1 => /bookname/category1/category1.1.html
----category1.2 => /bookname/category1/category1.2.html
--category2 => /bookname/category2.html
----category2.1 => /bookname/category2/category2.1.html