By ryanmills on
I am working on a newspaper site and I have gotten every thing to work but the menu has been a challenge. I was reading thru this article http://drupal.org/nyobserver#comment-722379 and they explain their approach as...
Scheduled publishing. The Home and Channel pages use a simple menu callback function that selects the correct Edition node for that page by choosing the one with the newest Effective Date in the past. It then just calls return node_view($nid). Simple.
While I get node_view($nid) I don't understand how to write that sort of lookup/iterate into a menu hook. Has anyone done something similar? Seen examples of it?
Comments
bumping with hope. -RM
bumping with hope.
-RM
Maybe this will help
First off you may want to check out the E-Publish module which may make things simplier.
If you still want to write code this may help. Lets give our module the name 'mymodule' and a menu hook that at least has
We now need a callback function called 'mymodule_current_edition' that takes one argument that determines what we are looking for.