2

I have a requirement to hide the "Respond to Survey" link on all surveys for a SP2010 site if the user has already responded. I followed the process using this link but the ToolbarTemplate property is not working in the custom feature.

I have this in the schema.xml file of the feature

<View BaseViewID="0" FreeForm="TRUE" ReadOnly="TRUE" TabularView="FALSE" Type="HTML" ToolbarTemplate="CustomViewToolBar" CssStyleSheet="survey.css">

and I copied the DefaultViewTemplate.ascx file to CustomDefaultTemplates.ascx, removed all templates except "ViewToolBar" template and renamed it to "CustomViewToolBar" as per the instructions but it does not work.

At this point I have removed the the DefaultViewTemplate.ascx file from the CONTROLTEMPLATES folder and the CustomViewToolBar template is simply a copy of the ViewToolBar so I could just test that it calls my custom template correctly. But no toolbar displays and in the logs it shows this message "Control template "ViewToolBar" does not exist." So it's still using the default ViewToolBar.

Can anyone tell me why the ToolbarTemplate="CustomViewToolBar" is not working? What am I missing here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.