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.
By ardee-1 on
Right now, you can go to a page like www.example.com/taxonomy/term/19. If you have pathauto, the same page will come up if you go to www.example.com/species/cat (or something like that).
How do you, the site developer, modify what that page looks like? I want it to be a customized table of node teasers (with paging) with columns of my choosing. I know how to customize pages individually but how to do it for any conceivable page generated by such a path?
Comments
a flurry of interest
I dunno if it's just today, but
Duplicates:
http://drupal.org/node/131039 (use views)
http://drupal.org/node/131246 (over-ride it with your own module)
I too am not sure yet.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Thanks
Thanks dman. One of those discussions IS quite similar to what I'm trying to do.
Basically I want a customized table instead of the list of teasers that you get automatically. I could get it easily if the URL ended with "?term=#" instead of "/#" because then the term id would be a parameter i could grab in my page's code. (The page is already written but I don't know how to get it invoked for clicks that request list of nodes in a taxonomy -- e.g., from a menu or from tagadelic.)
I think a tiny tweak to the Taxonomy Redirect module might do it for me. I've posted a request to its author.
Or perhaps there's a Drupal trick to make a path like "x/y" automatically turn into "x?q=y" or something like that -- which would essentially be the OPPOSITE of what you get when you enable Clean URLs!
Yes-siree
Yes, a very neat drupally trick.
If you've caught the request with a menu
and sent it to your func:
Then a request to /taxonomy/term/17
will send each item found in the remaining path as args to your callback and invoke taxonomy_term_page(17);
:-B
/taxonomy/term/17/made/up/stuff
->
taxonomy_term_page(17,'made','up','stuff')
You can also get the whole lot via the args() function. Don't mess with GET - it's already been parsed for you.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
I'm dense
dman, I don't fully understand your post (sorry, I'm dense sometimes).
I don't get the reference to "you've caught the request with a menu". Does that imply that I'm writing a module? (I'm not.) I don't understand the array, either.
But I think I've solved my issue. See my post entitled "Yup" at http://drupal.org/node/131039.
If I run into problems with my approach, I'll post here again. Otherwise, consider the method I discuss there to be successful.
Thanks!