问题
I'm pretty new to drupal development.
I have a group node and inside it a content type called efforts. To this efforts i need to add a calendar and I also need to a add a create event button inside the effort page. the event is another content type that I created for the calendar.
I already created the two content types for handling events and efforts. I also added a calendar view to the effort. I need to add a create event button to the effort page.
Can some one tell me how do i do this ? How do i add a block which contains the create event button to the effort page ?
Thanks
回答1:
Try the nodereference_url module. You will add a nodereference field on the event content type that only allows Effort nodes to be referenced. This then allows you to create a link on the Effort page like "Create a new event for this effort", takes you to the node/add/event with the node reference field already filled in with that Effort where you clicked the link. The 2 are forevermore linked and views relationships can do the rest. Hope that helps.
来源:https://stackoverflow.com/questions/9119920/create-content-type-button