Closed (fixed)
Project:
Mailhandler
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2009 at 12:08 UTC
Updated:
20 Apr 2011 at 21:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
balajij commentedHai,
follow this steps:
1.first create a page and save the page.it will be saved with a node number say (node/xx)
2.Go to primary links and create a menu.under the menu link title provide the node number(the node number under which the page have been created)
3.Now when you click the menu it will be taken to the corresponding page.
Thanks
Balaji
Comment #2
z.stolar commentedThere is no such option. For that to happen, we'll need to introduce a hook, which will be invoked after the node/comment is saved. This way you'll have the node object, and you'll be able to act upon.
Comment #3
acecombat commentedRe: Comment #1 - That would defeat the purpose of having it updated via E-Mail.
Re: Comment #2 - Any chance of getting that implemented in a dev version soon? I'm sure it's not overly complicated to do but my PHP is quite rusty :(
Comment #4
z.stolar commentedMarking as feature request
Comment #5
z.stolar commentedAttached patch introduces a new hook: mailhandler_post_save($nid, $type)
$type is "node" or "comment".
$nid is either a node id or a comment id, depends on $type.
Comment #6
acecombat commentedSo how does specifying $nid and $type generate a menu link? Or is just for the basis of further patches/modules to take advantage of? If it's the latter, is there any chance you could provide an example or another patch that would allow the creation of menu links?
Comment #7
z.stolar commentedThis patch adds a hook to mailhandler. You can implement this hook in a stand-alone module, to create menu items out of newly created nodes.
It wouldn't be scalable to do everything in mailhandler.
This is as far as we'd go, with regards to the feature request. It lets you do whatever you want with the node, including adding a menu item for it, change the url alias, add a reference to another node etc...
Comment #8
acecombat commentedIs there any chance you can have mailhandler create a menu link either inbuilt or using the hook as that is what I originally required?
Comment #9
z.stolar commented@acecombat: no, I won't add that specific feature in mailhandler. As I explained, it wouldn't be scalable. I created a hook for you to use, in order to accomplish the task. With $nid, you can probably do about anything with your node, but you'll have to do it yourself :-)
Comment #10
z.stolar commentedCommitted
Comment #13
timatlee commentedWhen I leverage this hook, I don't get a value for $nid, but I do get a value for $type.
Comment #14
timatlee commentedNevermind. I don't know how to debug code...
Turns out that the whole node is passed in, not just the node ID (which is what I assumed was passed by the variable name).