To add a link in your view header to create a content type, do the followings:
- Open your view.
- Under the HEADER section, add the following code in your Global: Text area:
[ <a href="/node/add/trade?destination=/trade-alerts">Add Trade</a> ] <hr></hr>
- Make sure that you set your Text format filter to FULL HTML.
- Replace
trade
with your own content type machine name. ?destination=
will redirect to the destination path after content is saved.- Repeat the same steps for FOOTER section.
- Optional: check Display even if view has no result.
The end result will look like the followings: