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.
[current-page:title] seems to be generating:
<em>Edit contenttype</em>page title
instead of just "page title" like I would expect.
Comments
Comment #1
Dave ReidThe token is returning the result from drupal_get_title() so it's up to other modules and code to set it properly. Can you maybe expand a little bit more about what use case you are trying to use the token for?
Comment #2
glide CreditAttribution: glide commentedSure.
I created a content type "meeting" is has several file fields used to store the presentations given at the meeting.
To organize things I specified things like "[current-page:title]/posters" for the file directory to store them.
When I add content of this type I get directories like these:
which then contains:
Which then actually contains my desired sub-directories.
The
<em> Edit Meeting </em>
would be bad enough, but the/
in the</em>
is messing up the paths even more.Comment #3
Dave ReidYeah I cannot recommend using that token in file directory configuration as it is not reliable. When the file is saved to the web server when uploaded, the current page is in fact the Add or edit page for the node, and the title is 'Edit '. This is the way the token works.
Comment #4
glide CreditAttribution: glide commentedBut it didnt work this way in the past, this behaviour only started recently. I dont know exactly when becuase we only have these meetings twice a year, but it was fine in November.
"Meetings" I created up until November 30, 2011 worked as I expected. Sometime after that something changed.