Custom templated list control – SharePoint Designer

Yesterday I created a custom templated list control which I now have working on the dev image. This shows the content of a SharePoint list in a HTML template of your choice. In this case I have created two lists at the root level called MenuItems and DropDownListItems, both of which have two columns, Title and URL. I can then put the following in the master page:

Create the top horizontal menu:

  • <a href="”>

Create the drop-down list:

I want to

– Select –

<option value="”>

In order to deploy this I have had to alter the web.config to add the control to the SafeControls collection, and in order to allow a templated control to run I had to also change the SafeMode collection:

This is saying allow server side script (which is what Sharepoint classes templated controls as) to run on the chris.master master page. If we are not going to allow this in the live environments let me know and I will have to develop a separate control for each, i.e. a menu control, drop down list control, bulleted list control, and so on.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s