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.
I would like to be able for my view to have the URL of /blog (the blog module seems to occupy that space). I'm not sure where views comes into the stack and if it's able to override that when i assign my path value for my view. If i create a path of /blog is Drupal going to ignore that and render the default /blog presentation?
Comments
Comment #1
rockitdev CreditAttribution: rockitdev commentedhere's the behaviour i am noticing.
the /blog path seems to render the my view the way i expect it to.
however, if i include /blog/taxonomyterm it reverts back to the default rendering of a blog. here is my view.
Comment #2
rockitdev CreditAttribution: rockitdev commentedComment #3
merlinofchaos CreditAttribution: merlinofchaos commentedPlease don't edit comments. I receive emails when the comments are generated, and not when they are edited. When I saw you close this issue and then reactivate it without comment I was very confused.
For overriding blog, I believe you need to override 'blog' and 'blog/%' independently. You can use 2 page displays with the same settings to achieve this result. This is from memory, but the issue is because Drupal's menu system can be quite tricky when it comes to overrides.
Comment #4
rockitdev CreditAttribution: rockitdev commentedSorry dude.
I gave it a shot with 2 displays, but still seem to get the desired result when i pass a term as an argument. it's not that big of a deal that it won't work... thanks for getting back to me.
Comment #5
frankcarey CreditAttribution: frankcarey commentedsame issue here. I figured this would have been super easy, but menu system strikes again :) I'm trying 'blog/%' as the path for the view. Any ideas why this wouldn't work?
Comment #6
frankcarey CreditAttribution: frankcarey commentedwait... forgot to hit save ...ugg 2am :) Please note that this IS working for me now, but only "blog/%" not "/blog". I'll try the double display solution mOFc suggested.
Comment #7
Jumoke CreditAttribution: Jumoke commentedI created a VIEW using blogs/% as display. The argument is %username.
When i go to blogs/% i still see the regular system blog. What am i doing wrong?
Comment #8
dalinWorks as @merlinofchaos suggests: create one View with two identical displays, the URL for one is
blog
, the URL for the second one is
blog/%
Comment #9
jpromeo CreditAttribution: jpromeo commentedI am having the same issue with no resolution. I have one view with 2 page displays - one with no arguments (/blog) and a second for date arguments (/blog/%1/%2). The view seems to be overriding the system for /blog as I can change the pagination and see the correct result but when I try to add an argument (/blog/2011), I get a 'page not found'.
Any insights would be appreciated.
Comment #10
nateman332 CreditAttribution: nateman332 commentedThis isn't working for me.
I'm doing as @merlinofchaos suggested (two identical pages, one with path "blogs/%" and the other with "blogs") but I'm still getting the default display.
An example is http://www.alberni.ca/blogs/comfort-zone
This is what the page should look like: http://www.alberni.ca/blogs/all
Help!
Comment #11
VM CreditAttribution: VM commentedare you sure you saved the views?
as an aside, in today's environment, I'd think that a future proof idea is to bypass the blog.module and create your own blog content type using. then generate your lists with views and taxonomy? It's how I've deal with blogs since D6 and IIRC the blog module is deprecated in D8. If you've building a new site, one should really consider D7 instead of D6 at this point since D6 won't be supported when D8 is released.
Comment #12
nateman332 CreditAttribution: nateman332 commentedAlthough this isn't fixed for me, I changed the URL alias for user blogs and now it's working fine (and yes, I saved the view). Could it be that views cannot override URL aliases? (the % in my view represents a username not a user ID)
Comment #13
gdesmarais CreditAttribution: gdesmarais commentedFor what it's worth, this post explained it to me:
http://drupal.stackexchange.com/questions/4413/how-to-override-individua...
You need to override the internal path of blog/uid (blog/% as the path on your virew page).
Comment #14
MustangGB CreditAttribution: MustangGB commented