I have a fairly simple SharePoint subsite that has two elements:
- the home page
- a document library
The document library has two content types associated with it. What I would like to do is add a link (or button, whatever) to the home page that creates a new document based on the content type.
Essentially, I want to replicate the behavior of:
- Navigating to the library
- Clicking the Documents tab
- Selecting one of the content types from the New Document icon
All from the subsite's home page. Is this possible?
EDIT: I finally got a chance to look at this. Sorry for the huge delay.
So, I created the new form (test.aspx) and inserted the following script and link(s) in the page:
<script type="text/javascript">
function generalInformation() {
var options = SP.UI.$create_DialogOptions();
options.title = "New General Information Bulletin";
options.autoSize = true;
options.url = "Bulletins/Forms/test.aspx";
SP.UI.ModalDialog.showModalDialog(options); }
</script>
<div>
<a onclick="javascript:generalInformation();">New General Information Bulletin</a>
<a href="Bulletins/Forms/test.aspx">New General Information Bulletin</a></div>
So, I have the two links just for testing purposes. Once invokes the javascript function, and does open a modal dialog. The desired behavior, however, is for Word to launch with a new document based on the template specified by the content type. I'm not sure what I've got wrong, but that is not at all the result I am getting.
Instead, the first link launches a dialog entitled "New General Information Bulletin" that has edit and page tabs, and a save, cancel, paste, cut, and copy buttons in the ribbon. It also has two Save and Cancel buttons. Neither appears to do anything.
What am I missing?