Posted by Anonymous on February 9, 2007 at 9:25pm
I'm interested in something that sounds like maybe pathauto will fill be none of the words I've seen exactly tell me that it does.
So tell me about pathauto. Does it use menus and menu titles to know what to make the alias? Does it use the Title of the node? Is it configurable to use either or both?
Now to go find a menuauto that fills in by default from the node title.
TIA,
Earnie
Comments
research
I suggest you install the module on a test site and see what you find.
It only takes 2 minutes.
--
Knaddison Family | mmm Free Range Burritos
knaddison blog | Morris Animal Foundation
One of the sad things about
One of the sad things about all of the modules is the lack of information about the module itself. I must install the module to figure out what it does and then my test system may be infected by changes that I don't want and I must play the backup/restore game because not all modules (if any) provide an uninstall feature to completely remove itself from the system. Yes it takes two minutes to install but more information up front would help promote the module and what it can do. A snapshot of the admin page available from http://drupal.org/project/pathauto would have quickly answered this question and I wouldn't have even posted here.
So, yes, it somewhat does what I need. I may need to play with coding different options. My next test will be to add web_links and see how well pathauto plays with it. And also to play with different space conversion characters to determine which one I like the best. I'm thinking the underscore character is more search engine friendly, what do you think?
In short, it takes the title
In short, it takes the title of what you submit and prepends any path information that you configure it to included.
For example, you post an item named "This is my great new story" with a category of "Articles" assigned to it. The category is derived from how you've set up your Vocabularies (also know as taxonomy).
Within the settings of PathAuto you would have specified something like [cat]/[title], where those values act like merge fields.
Then, like magic (it's not really magic), the url_alias table within the database gets a new clean url path that reads like this.
<basepathofsite>/articles/this-is-my-great-new-storyor you can make it read with the .html if you configure it like this
[cat]/[title].html
Essentially, it automates what you would manually do in the URL Path Settings of a new content item (node).
One suggestion I have is to use dashes instead of underscores. PathAuto defaults to underscores. Read this for more info.
http://forums.searchenginewatch.com/showthread.php?t=6460
Or do a simple Google search yourself. Input "drupal_paths" vs. "drupal-paths". It all boils down to how language is parsed by the search engines. The dash is a much better separator.
GotDrupal.com
Sharing what I know via Drupal Videos
Dashes & Development
Like mattman said, dashes are preferable to underscores in almost all situations.
As a result, pathauto is built to default to the - and not the _ . Upon your initial install, the dash should be the default separator character, but if you would like to change it to something else, that can be done via the admin.
earnie:
yes, more documentation up front about what a module does and how it does it would probably be helpful. It is sometimes difficult to determine if a module does exactly what you want it to or not, and I've experienced those same problems myself. Some modules like pathauto don't actually impact your database structure at all, making them easy to drop in, test, and then remove if necessary. Others make structural changes (usually simply adding tables) which can be undesirable. The way I have handled this problem, and my suggestion to you, would be to create a testing version for modules. Just drop a development database in place and a development install of drupal based on whatever version you are running (takes 2 minutes), then, you can simply drop modules in to your development environment and see how they interact.
that's a great point
earnie - that's a great point. Could you create the documentation that you'd like to see? I'll happily edit the project page to include a link to it in the handbook or the image gallery or wherever else on drupal.org that it gets created.
Thanks!
My general feeling is that you will never get a reliable feeling for a module until you install it. Module developers will sometimes post wish lists on the project page as if it is the real status of the module. You just never know until you install it and test it out. So, I've got a development environment which I wipe clean every few weeks where I test out modules prior to using them for real. It's the only way to know what you're doing.
--
Knaddison Family | mmm Free Range Burritos
knaddison blog | Morris Animal Foundation
now created...
http://drupal.org/node/124452
Screenshot now created and added to the project page.
Earnie, does that seem sufficient? Any more ways it could be improved?
Greg
--
Knaddisons Denver Life | mmm Free Range Burritos
knaddison blog | Morris Animal Foundation
hey greggles..
Not sure if this is the best place to post this but it looks like you were active here recently and my question does sort of fit with the theme of the thread.
i've got a 5.1 install working. After creating about 40+ nodes, i turned pathauto on and would like to do what i think the module refers to as a 'bulk update'. e.g. my definiiton of a bulk update is that pathauto will go and RE generate and REplace url aliases that already exist on previous nodes (e.g. based upon the radio button i select for 'Update Action' in 'General Settings').
When you get to the "Node Path Settings" collapsible fieldset, the checkbox option for bulk update states "Generate aliases for all existing nodes which do not already have aliases".
Qs:
PART1
1) Is that an error? Does the bulk update ONLY create url aliases for nodes withOUT aliases already?
If so:
2) How would i bulk update (replace) EXISTING node aliases with the settings in pathauto withOUT having to manually go to ever single 40+ node and resubmit them one by one? that seems a little tedious yes?
If not:
And i think the answer IS not because when i check bulk update, it seems to update all my nodes!!! but maybe i'm wrong..
3) Someone needs to change the wording on that bulk update checkbox because it's misleading - e.g people won't think it works on existing node aliases (e.g. it's NOT a REPLACER)
PART 2
1) When pathauto calculate a nodes alias using menupath, if the same node is defined as a target for more than one menu item (possibly in different menus), do you know how pathauto decides which menu/menupath (e.g. which of the multiple menu items) to base the alias on?
Somehow i imagine pathauto makes a call to the menu system which uses some ordering mechanism to traverse the menus looking for a match. I imagine that either the first or last menu item matched is going to be the one used for pathauto menualias.. but i can't be for sure..
I ask because i'm wondering if there is a way for me to influence the results of menutpath pathauto when using the same node in mutliple menu items/menus. e.g. maybe i can force a given root menu to have a higher menu id or something..
2) ** Also, do you know if creating a menu item on the node edit form has a higer precedence than if you manually add the same node as a menu item in admin/build/menus explicitly?? I'D REALLY LIKE TO KNOW THIS.. POSSIBLY IT MAKES NO DIFFERENCE AND IS JUST BASED ON MENU ID ORDER OR SOMETHING. But i'd like to know if you have an answer..
Anyway.. anxiously awaiting anything you might offer
thanks
Part 1: 1) Bulk update
Part 1:
1) Bulk update touches all items in the group whether they currently have aliases or not. However, you can change the "Update action" in the general settings to make it leave items with current aliases alone.
2) Not sure that you can do that.
3) All changes (and requests for changes) should be logged in the pathauto issue queue. When you do submit that issue please state specifically what the text should read.
Part 2:
1) I'm not sure. I suggest you try it out and report back providing documentation in the handbook.
2) I'm also not sure about this either but again suggest that you try it out.
Hope this helps,
Greg
--
Knaddisons Denver Life | mmm Free Range Burritos
knaddison blog | Morris Animal Foundation
File an issue
File a bug (and a patch) with those that don't. That's what I do, and most module maintainers seem to be quite happy to receive patches for this. And even if you don't care enough to file a patch (even to clean out your own system), just letting them know that they're missing this is a step towards them implementing it, making it easier on the next person(s) to try out the module.
Oh, and Pathauto does utilise a
pathauto_uninstall()to remove itself from the system.--
Frederik 'Freso' S. Olesen
--
Frederik 'Freso' S. Olesen
How to get URL Alias from PathAuto for new content?
Hello,
I a newcomer to Drupal. I have an issue in trying to get Path/Pathauto combination to work on my test-site and is similar in context to this discussion. And I am hoping you will be able to shed some light.
The question is when a new content piece (for example a question) is created, a new url_alias is not created. However, when I use the 'Bulk Update' option in PathAuto the aliases are generated and inserted correctly. I have updated the pathauto_node.inc similar to the 'Book' module based on node->type to add additional information to the url alias. Please note I have created a new module for the Question type.
My question is what are the things that need to happen for url_alias to get created and PathAuto to get called to update the alias when a user submits a new piece of content? For example what tables other than the node table, if any, etc. Is there a callback I need to register?
I have looked at the forums and have not been able to find a way to fix this. Again thanks in advance for your kind advice.
Warm regards,
Asanka
issue
The situation you describe sounds like a bug. Please create an issue for it with very specific concrete consistently repeatable steps that will explain to me how to repeat the bug.
From your current description it's quite vague 1) what changes you've made 2) why those changes were necessary 3) how I might even begin to debug.
--
Knaddisons Denver Life | mmm Free Range Burritos
knaddison blog | Morris Animal Foundation