How to configure lists and libraries - Puzzlepart/prosjektportalen GitHub Wiki
Introduction
In order to configure lists and libraries, you need to create an extension file. You can use any editor you want as long the file extension is .txt
.
Creating the extension file
Open Notepad
or similiar. We now need to write some JSON.
http://jsoneditoronline.org/
TIP: You can useYou can use this as starting point:
This will create a new list 'Prosjektoppgaver', add a custom content type and configure the default view of that list. You can also use this method to override default lists and libraries created in the default project (by Prosjektportalen).
{
"Lists": [{
"Title": "Prosjektoppgaver",
"Description": "",
"Template": 171,
"ContentTypesEnabled": true,
"RemoveExistingContentTypes": true,
"ContentTypeBindings": [{
"ContentTypeID": "0x010800233B015F95174C9A8EB505493841DE8D"
}],
"AdditionalSettings": {
"EnableVersioning": true
},
"Views": [{
"Title": "Alle oppgaver",
"ViewFields": ["Checkmark", "LinkTitle", "StartDate", "DueDate", "AssignedTo", "GtProjectPhase", "Modified", "Editor"],
"AdditionalSettings": {
"RowLimit": 30,
"Paged": true,
"ViewQuery": ""
}
}]
}]
}
Important to note here is:
- Title
Title is the title of the list. The URL will be automatically set according to the title
- Template
The ID of the list type. An overview of list template ID's can be found here https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splisttemplatetype.aspx
- ContentTypeBindings
This is where you can bind custom content types to the list.
- Views
You can configure several views for the list. Remember to use the internal field names for viewfields.
When you're done adding your desired links, save the file with extension .txt
.
Upload the extension file
Find the library
- Go to Site Settings
- Under
Look and Feel
/Utseende og funksjonalitet
you'll findProject Portal - Extensions
/Prosjektportalen - Utvidelser
- This link will take you to the extension library where you can upload your extension file
Configure the extension item
After upload your .txt
file, it's time to look at the extension item.
Open the edit form of the extension file.
The edit form should look something like this:
- Rekkefølge / Order
Order of execution. Important in some advanced cases where you have multiple extensions dependent on each other.
- Aktivert / Active
Is the extension activated, meaning should it be executed when creating new projects.
- Vis i skjema / Show in form
Should the extension be visible and selectable in the new project form.
- Navn
Filename (not important)
- Tittel
Add a descriptive title
- Kommentarer
Add comments (optional)