Closed (fixed)
Project:
Pathauto
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
23 Apr 2007 at 09:39 UTC
Updated:
20 Mar 2008 at 17:12 UTC
Jump to comment: Most recent file
A feed pattern would be very nice. Example pattern: [cat].xml
regards pebosi
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | allow_admin_configure_feed_pattern_138460.patch | 3.33 KB | greggles |
Comments
Comment #1
wim leersWhy would you want a .xml extension if you can have clean URLs? The whole point of Path and Pathauto is to provide cleaner URLs...
Comment #2
gregglesCurrently the feed pattern is hardcoded in each of the .inc files as /feed which I agree is more limiting than pathauto should probably be. On the other hand...if we let users create their own patterns for feeds it is an area where it is really easy to make dangerous patterns that clobber parts of your site or create duplicate entries...
I propose to provide a textarea where you can specify the feed extension and it would default to "feed" but could also be "rss.xml" or whatever else people feel is appropriate.
I don't believe it makes sense to support full patterns in this field because the feed alias should be made of "current_normal_pattern" + $feed_extension
Right?
Also, new features generally go in the new version, so I changed that.
Comment #3
suzanne.aldrich commentedI also noticed that IE doesn't like /feed but seems to render /rss.xml just fine.
Comment #4
gregglesThere are two parts to this issue in my mind:
1) the pattern that is exposed to the world -i.e. /feed vs. /rss.xml
2) the internal path for the feed - which is currently assumed to be /feed or /0/feed
I can see exposing both of them on a per object type basis. That is, for all terms you could specify to have ONE external pattern of rss.xml or /feed. The reason I feel this way is that already that screen is very long. If we double or triple the number of text boxes that are shown to the user it would be really painful.
I don't plan to work on this for a month or so. If someone else wants to that would be great.
In my mind it requires:
1) Adding two textboxes where the "Create feed aliases" checkbox currently sites.
2) The first textbox would be the feed pattern and default to "feed" which would become the new "pathauto_MODULE_applytofeeds" variable
3) The second textbox would be the internal feed address and would default to the value from the $settings['supportsfeeds']
4) a pathauto_update_XX() function which would read the current pathauto_MODULE_applytofeeds variables and, if set, set the default pattern for that module instead of the current boolean.
This also requires changes to pathauto.inc around line 257 to "do the right thing" in creating the alias.
Comment #5
gregglesAlso, I marked http://drupal.org/node/188688 as a duplicate of this.
The reason I'm not going to work on this is that right now I just want the 5.x-2.x branch to be stable which means no new features until 5.x-2.1.
Comment #6
gregglesI think this would be a nice thing to do so I'm assigning it to myself for 5.x-2.1.
If someone needs it sooner than I get to it, feel free to provide your own patch.
Comment #7
greggles...3 months go by...
Ok, and here's an initial patch which only addresses what is used for the alias internally. This fixes the problem that views uses /feed instead of /0/feed but it doesn't do anything to help the external alias be /rss.xml instead of /feed.
I tested it just a little bit but it seems to work fine.
Note that this requires a visit to update.php to remove the _supportsfeeds variables.
Comment #8
gregglesOk, part 1 is done and committed for 5.x and HEAD.
Part 2 is to allow admins to specify the pattern for the feed so that they can request the public alias is rss.xml instead of /feed
I think this should be a sitewide or "general" setting.
Comment #9
gregglesI realized that the feature request remaining in #8 can be done with something like http://drupal.org/project/tokennodetokens so I'm just going to mark this as fixed.
If someone needs more guidance than that just ask and I can write up a handbook page on how to do it.
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.