By mikeryan on
Is there a generic way to link to a specific node type, the way /taxonomy/page/or/3 links to a specific taxonomy term? Specifically, I'd like to create a navigation link "News" pointing to a list of nodes of the flexinode type "news".
Thanks!
Comments
Here it is...
On my sandbox you'll find an hacked module taxonomy module that lets you add a node type filter.
The syntax is
/taxonomy/page|feed/and|or/item1,item2/nodetype1,nodetype2
if you omit nodetypes, all nodetype is assumed; if you specify it, noe_types are filtered in or.
This module works fine on Drupal 4.4.x, but also manages terms and vocabulary translations, and the two patches are not separate.
Follow all 'matteo' string to understand where I hacked the code.
http://cvs.drupal.org/viewcvs/contributions/sandbox/matteo/modules/Drupa...
Hope it helps,
I would like this feature to be added to Drupal Core....
CIAO
Matteo
mailto:webmaster@cantincoro.org
My first module...
I was looking to do this independently of taxonomy, I finally got back to it and wrote my first (very simple) module. Enable this module and the URI "bynodetype/{type_name}" will give you a listing of nodes of the specified type (for flexinodes, you need to use the "flexinode-1" form rather than the typename you gave it).
Comments welcome... I think this functionality could easily be added into the node module, but if a separate module is desired I can submit it.
Problem with bynodetype module
I am new to drupal and having a bit of an issue with this specific module, perhaps I missed something.
I cut and pasted the module into modules/bynodetype/bynodetype.module.
I then went to administer >> configuration >> modules and enabled the module.
I noticed that the name of the module as well as its description appeared (the description indicates that the module cut and paste was at least valid for php as there was no parse error)
I then tried to goto /bynodetype/story and it claimed that it was not found. Infact anything that I did just /bynodetype (with and without trailing slash) and anything after that resulted in a 404.
In administer >> logs >> httpd it shows a 404 for every request that I issued.
I am running drupal 4.4.2 - everything else is working so I am fairly sure that it is not my installation of drupal itself.
I even tried using mysql client to see if the sql statement was off, however that did not have any problems, and worked as expected.
I cannot think of why this module would show up in 'admin' but not be locatable anywhere else, unless perhaps the API changed a bit in 4.4.2. Any help on this would be greatly appreciated as I need this type of functionality (for book reviews, which provides no aparent means to view just the book reviews).
Thanks a lot
Works perfectly for me, very
Works perfectly for me, very nice.
Brian Burnham
http://brianburnham.com
Have to take that back, the m
Have to take that back, the module generates an error on user logout. Odd. I had to deactivate it.
Brian Burnham
http://brianburnham.com
how did you get it to work
I was wondering how you got it to work? what uri did you specify?
I can live with an error on logout :)
uhh hmm
I had apache 1.3.x installed and it failed ot work, I installed 2.0.x last night (I wanted ipv6) and now it works.. Quite odd..