I have a view of the Project node type (created by the pm module) that works well. For authorized users I would like to create a link button that will allow them to create a new project. I've spent the last several hours surfing the web trying to find out how to do this. I am new to Drupal so a solution that avoids using CSS & php would be most welcome. enter image description here

enter image description here


You needn't use the PHP module, using PHP in the backend UI is usually a bad idea anyway.

First of all, the node creation link is simply a system link like /node/add/project which works only for users with the correct permissions.

There are ways to correctly route links through Drupal in Views (custom text—output as link), but as this is just for administrative reasons, you can probably simplay paste HTML like <a href="/node/add/project">add Project</a> in a custom text field / View header / View footer.
This displays the link for everyone with access to the View though.

If you want to display the link to specific users only, the easiest way is to simply create a block with the aforementioned link, display it on the same page as the View and show it only on specific user roles.

You could also set up a different view with different access privileges and attach it via an additional module, but I would deem this overkill.


Add this in Global header as custom unfiltered text.

<a href="/node/add/webinar" class="button button-action button--primary button--small"/>Add Webinar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.