Another approach is to display a special (informational) message on your specific page where you want to have this functionality (= "add content to my specific content type") available. And eventually only show such message to users with a specific role (eg an administrator).
To do so, all you'd need is to enable the Rules module, and create an extremely basic custom rule which looks like so (in Rules export format):
{ "rules_show_a_message_on_a_specific_path" : {
"LABEL" : "Show a message on a specific path",
"PLUGIN" : "reaction rule",
"ACTIVE" : false,
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "init" : [] },
"IF" : [
{ "user_has_role" : {
"account" : [ "site:current-user" ],
"roles" : { "value" : { "3" : "3" } }
}
},
{ "data_is" : {
"data" : [ "site:current-page:path" ],
"value" : "path\/to\/my\/page"
}
}
],
"DO" : [
{ "drupal_message" : { "message" : "Click \u003Ca href=\u0022[site:url]\/node\/add\/article\u0022\u003Ethis link\u003C\/a\u003E to add some content of type Article ..." } }
]
}
}
If you have the Rules UI enabled, you can simply import the above rule in your own site (and enable the rule afterwards, which is disabled as shown above).
Here is what the above rule actually does:
- Check if the currently logged in user has access to role "administrator" (which corresponds to role id = "
3
").
- Check if the current path is
path/to/my/page
.
- If both checks (= Rules Conditions) are satisfied, then the Rules Action will be performed, which is to display a message like "Click this link to add some content of type Article ...", whereas this link is actually an hyperlink to
/node/add/article
.
If needed, just adapt the values for the role id, the current path, and the actual message (including the URL in it and or the used content type) to fit your own needs.