At 08:03 PM 9/20/2009, rajasekharan <[email protected]> wrote:
How can I create url alias for all nodes created as stories to a certain
format. For example - node/4 beomes /post/4. Are there any existing
modules to do this task?

The answer you'll hear is Pathauto. Or you can do this inside your own module...

function mymodule_nodeapi(&$node, $op) {
        switch($op) {
                case 'insert' :
                        if($node->type == 'story') {
                                $node->path = 'story/' . $node->nid;
path_set_alias("node/$node->nid", $node->path);
                                }
                        }
                        break;
        }
}

LVX
TF


---
As If Productions
http://www.asifproductions.com
Interactive Worlds and Immersive Obsessions

Reply via email to