[support] using real path aliases

Daniel Germer daniel at triple5.org
Sat Feb 9 16:31:46 UTC 2013


Hi, I had trouble generating path aliases for nested documents.

I am creating a book within my site and I want the pathauto alias to be
generated with the path reflecting the chapters,

for example I have created a page:

example.com/book

Now, when I create a subpage of book (e.g. the chapter: introduction) I
want it automatically named:
example.com/book/introduction

when I go there and create a subpage acknowledgments that I appears the
alias
example.com/book/introduction/acknowledgments

and so on,

ideally, when I move a page between chapters this would also be updating
the path alias.

any hints for that? I have installed transliteration and pathauto so
far, when I use the pattern for current path:
[current-page:url:relative]/[node:title] it creates something like

example.com/nodeaddbook/acknowledgments
So I used the wrong pattern, it should have been:
[node:book:parents:join-path]/[node:title]
as replacement pattern, this can be found under the alias settings:
/admin/config/search/path/patterns
content > book...

So this works.

Now when I decide to move a page between chapters I have to do it in the
edit tab and then move down to change the book outline, if I was going
to move the page with the tab "outline" above the page (next to edit) it
changed the automatic alias to fixed, so the path alias won't reflect my
page move.
This behaviour is good for keeping links working.

The better solution would be to automatically create a redirect to the
new page, so let's see what happens when adding the redirect module here...

although I have set the module to add a redirect when url-alias is
change this did not affect the automatic change when moving a page. Also
the url-alias does not change when I do the move from the outline tab
above my book-page.




More information about the support mailing list