Hello,

I'm using the NodeComments module, and as such, I have a need for a certain page type. This would be used for the 2nd (and final) page of my route.

My page type needs to be very much like Add Form page type. However, I need it to use the exact URL, as opposed to ignoring the Argument. For example, if I simply type (mysite.com/node/add/node_type/parentnodeID) into the address bar, NodeComments recognizes this as me wanting to add a NodeComment to the parentnodeID. However, it seems like this same URL in my page route doesn't make use of parentnodeID. How do I make a page type (similar to Add Form) that recognizes the parentnodeID?

Thanks,
DSC

Comments

fago’s picture

hm, I never used nodecomments. Probably it just reads the ID from the hardcoded URL parameter. You could try to make a route, which has the node-ID as argument on the same argument count, e.g. create a route with
pageroute/path/page_name/NODE_ID.

But probably the proper way to achieve this would be a pageroute integration for nodecomment. It could offer an own page type or form_alter() the existing node add page type, as every module can offer its own page types.
or better with a node management page one could reuse it to create/edit/delete comments.

So one could create a pageroute, that edits a node and next adds a comment to it..

fago’s picture

Status: Active » Fixed
dries’s picture

Status: Fixed » Closed (fixed)