Faking Reusable Content Lists in SharePoint 2010

In my last post I was complaining about how I can’t get the reusable content lists to work right in SharePoint 2010. No matter what I do, or on what page in my site, if I add a reusable html item, the code is displayed rather than being rendered by the browser. After having to manually add side navigation to dozens of pages I said “truck this, there’s gotta be an easier way-mothertrucking Sharepoint!&*” (yea, i’m a dork). We have a folder that we created in Designer at the root of our site collection called “snippets”. We (by “we” I mean myself and my programmer partner in web crime, Jesse Kyzar) use this folder to store small bits of code that we use on the site. I created a blank html page, stripped out everything in it and just added the side nav code. I then added a content editor web part to the side column on one of my site pages and I connected the webpart to pull the html snippet file. Works perfectly. It takes a few extra steps to add and configure the CEWP on each page but it is a lot faster to add the CEWP’s and then update one file rather than worry about having to update dozens of pages if my nav content changes.

If anyone figures out why the reusable content list doesn’t work the way it used to please share. Until then I’m gonna do my method and just pretend the reusable content list doesn’t exist.

 

UPDATE 6/04/2012: Thanks to reader Aneville for cluing me in on why it was not working. Apparently I had a brain fart and was putting my html in the visual editor instead of the raw html dialog. When I add the content directly in to the html dialog it all works perfectly. I was seriously over thinking this and made something simple way to complicated. Thanks Aneville and everyone else who responded!!!

Advertisements

5 thoughts on “Faking Reusable Content Lists in SharePoint 2010

  1. Yup, I’m using the reusable html content type. I have tried to use the items on publishing pages with custom publishing fields, on wiki pages, and on pages created from otb layouts and no dice-they display the html code each time ;(

  2. It is a weird issue in your box or environment because it is working just fine wherever I use the reusable content feature. Maybe you might need to double check all the publishing features, at site collection and site level, are activated and check the ULS logs and see if you can see anything in there when you try to use a reusable content piece.

  3. I got stuck on this briefly too. Make sure when you are creating the Reusable item and putting your information into the ‘Reusable HTML’ field that you are still going to Markup->Edit HTML. I was initially fooled thinking I could just put my raw html code in the ‘Reusable HTML’ field directly.

    • BLESS YOU!!!! I can’t believe I missed that! I added my code to the raw html and it all works just fine now. I’ve been using SP for almost 6 years now, I should have figured that one out. 😉

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