Title of a list view (ListViewWebPart) cannot be defined in ONET.XML so it cannot be set different from the title of the list it is showing.
If I modify the title with a browser (Modify Shared Web Part / Appearance / Title) and save the site as a template the new title is nowhere in the .stp file, still if I use that template to create a site the changes are there.
Use the WebPart tag and define the Title under it. In the following example a minimized List View Web Part is added with a title My custom title.
<View List="Documents" BaseViewID="11"
WebPartZoneID="Left" WebPartOrder="3" Scope="Recursive">
<Assembly>Microsoft.SharePoint, Version=188.8.131.52, Culture=neutral,
<Title>My custom title</Title>
I want to show the ListView webpart as minimized.
In order to do this I need to change the Chrome State.
Do i change it the same way you did with the Title?
And what is the property I need to change??
You can have it minimized by definingReplyDelete
thanx for the really really fast reply. I have the code below in my onet.xml file.ReplyDelete
when I create the site from the site definition. the list is still displayed in the normal state.
Is there anything i'm missing, some prerequisites maybe.
like everything in sharepoint it looks really really simple. yet somehow it actually isn't.
Code had been modified [ = < and
] = >
[View List="Lists/RegelingenLinks" BaseViewID="0" WebPartZoneID="wpzLeft" WebPartOrder="4" ]
[Assembly]Microsoft.SharePoint, Version=184.108.40.206, Culture=neutral,
I don't have a ready answer for you, but based on my testing (exporting web part and importing it), you could try having these three properties:ReplyDelete
FrameState appears to be obsolete and you should only use ChromeState, but only having ChromeState doesn't work. AllowMinimize must be true in order to be able to minimize web parts. It defaults as true, but it doesn't hurt trying to define it explicitly.
Also, if this doesn't help, can you try to export a minimized web part and try re-importing it to see if that works. If yes, then there is some issue that is related to onet.xml and minimized web parts.
How do you do this for Sharepoint 2003?ReplyDelete
I tried exactly your code (Except the assembly version is 11), but it doesn't seem to work.
Can you change the list view settings also ?? I mean can you define properties for customized viewsReplyDelete
could you help me changing the chrometype property to titleandborder for a listview webpart?
Have you tried exporting the web part and seeing how the ChromeType is defined?ReplyDelete
Exporting stuff after modifying them using browser is often a good way to find out how to do things declaratively.
Hey thanks a lot Jussi.. It helped me a lot [:)]ReplyDelete
Thx for this tip ;)ReplyDelete
Fantastic! I wish I'd found this years ago - not being able to set the list view title in a Site Def has annoyed me for years!ReplyDelete