{"id":88,"date":"2008-08-27T15:05:39","date_gmt":"2008-08-27T15:05:39","guid":{"rendered":"http:\/\/www.myfatblog.co.uk\/?p=88"},"modified":"2008-10-15T09:38:36","modified_gmt":"2008-10-15T09:38:36","slug":"how-to-brand-your-webpart-solutions","status":"publish","type":"post","link":"http:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/","title":{"rendered":"How to brand your WebPart solutions.."},"content":{"rendered":"<p><em>So you&#8217;ve written a nice web part solution, ready to release it onto your clients environment, but wait a minute! How do they know you wrote it for them? All you&#8217;ve got is those generic icons that microsoft provide you.<\/em><\/p>\n<p>This is the situation i found myself in recently, and realised that with my change in job role comes the requirement to make sure people are aware of the things that I&#8217;ve done. To this end, I decided to make sure that the company log is displayed in the Feature Activation page and in the Web Part Catalog.<\/p>\n<p>At this point, I&#8217;m going to assume that you&#8217;re aware of Features and how to wrap them up in a solution package.. if you&#8217;re not, then this might not be the best post for you to start at.. in fact I&#8217;d suggest you get a copy of Inside Microsoft Windows SharePoint Services 3.0 by Ted Pattison and Daniel Larson.<\/p>\n<p>Starting at the solution level, we need to place the icon that we want to use into an area accessible by the Web part. what better place than _Layouts\/Images?<\/p>\n<p>If you&#8217;ve followed the recommend webpart creation guidelines, you should have a directory structure in your VS2005 project that resembles TEMPLATE\\FEATURES etc etc..<\/p>\n<p>now under TEMPLATE add a new directory of IMAGES and then your own directory under this e.g. CUSTOMLOGOS (This is best practice to seperate your images from Microsofts in the IMAGES directory to avoid filename conflicts.)<\/p>\n<p>In this directory, place your chosen .JPG file which should be approximately 44 pixels square.<\/p>\n<p>The first task is to ensure that this file is included in your .WSP package. To do this, make sure the following line is in your DDF file. <em><strong>(NB: this is all on one line.. but my blog isn&#8217;t wide enough to display it!)<\/strong><\/em><\/p>\n<pre lang=\"XML\">TEMPLATE\\IMAGES\\CUSTOMLOGOS\\custom_logo_44sq.jpg IMAGES\\CUSTOMLOGOS\\custom_logo_44sq.jpg<\/pre>\n<p>And in your manifest.xml you&#8217;ll need a corresponding entry:-<\/p>\n<pre lang=\"XML\">\r\n<TemplateFiles>\r\n<TemplateFile Location=\"IMAGES\\CUSTOMLOGOS\\custom_Logo_44sq.jpg\"\/>\r\n<\/TemplateFiles>\r\n<\/pre>\n<p>The section above basically just copies your chosen logo into the IMAGES and makes it available using the URL <strong>\\IMAGES\\CUSTOMLOGOS\\custom_logo_44sq.jpg<\/strong><\/p>\n<p>The next step is to make this icon appear on the Feature activation page. This is very simple to achieve and just a matter of adding or amending the ImageUrl property of the Feature tag in your Feature.XML<\/p>\n<pre lang=\"XML\">\r\n<?xml version=\"1.0\" encoding=\"utf-8\" ?><\/code>\r\n<Feature\r\n  Id=\"00000000-0000-0000-0000-000000000000\"\r\n  Title=\"My custom branded web part\"\r\n  Description=\"This feature uses custom branding.\"\r\n  Hidden=\"FALSE\"\r\n  Scope=\"Site\"\r\n  ImageUrl=\"BlueSource\/BlueSource_Logo_43sq.jpg\"\r\n  xmlns=\"http:\/\/schemas.microsoft.com\/sharepoint\/\">\r\n<ElementManifests>\r\n    <ElementManifest Location=\"elements.xml\"\/>\r\n<\/ElementManifests>\r\n<\/Feature>\r\n<\/pre>\n<p>And then finally we want to make the image appear in the Web part gallery. This requires a change to the webpart file itself. Inside the Properties markup, add a new property tag similar to the following:-<\/p>\n<pre lang=\"XML\">\r\n<property name=\"CatalogIconImageUrl\" type=\"string\">\/_layouts\/images\/bluesource\/bluesource_logo_43sq.jpg><\/property>\r\n<\/pre>\n<p><em><strong>NB: Ensure that you don&#8217;t add any carriage returns or line feeds in the above statement. If you do, then there is a good chance that your image will only appear on either the pop up webpart catalog, or the advanced web part window, but not both. if that happens, check the line above in your .Webpart file.<\/strong><\/em><\/p>\n<p>And there you have it.. Deploy your solution and your icon will be visible on both the Feature activation screen and the Webpart gallery screen.<\/p>\n<p>I hope this helps.<\/p>\n<p>Reg.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you&#8217;ve written a nice web part solution, ready to release it onto your clients environment, but wait a minute! How do they know you wrote it for them? All you&#8217;ve got is those generic icons that microsoft provide you. This is the situation i found myself in recently, and realised that with my change &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[13,16,12],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to brand your WebPart solutions.. - Blog of an overweight SharePoint addict<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to brand your WebPart solutions.. - Blog of an overweight SharePoint addict\" \/>\n<meta property=\"og:description\" content=\"So you&#8217;ve written a nice web part solution, ready to release it onto your clients environment, but wait a minute! How do they know you wrote it for them? All you&#8217;ve got is those generic icons that microsoft provide you. This is the situation i found myself in recently, and realised that with my change &hellip; Continue reading\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of an overweight SharePoint addict\" \/>\n<meta property=\"article:published_time\" content=\"2008-08-27T15:05:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2008-10-15T09:38:36+00:00\" \/>\n<meta name=\"author\" content=\"Cimares\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cimares\" \/>\n<meta name=\"twitter:site\" content=\"@cimares\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Cimares\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/\",\"url\":\"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/\",\"name\":\"How to brand your WebPart solutions.. - Blog of an overweight SharePoint addict\",\"isPartOf\":{\"@id\":\"http:\/\/www.myfatblog.co.uk\/#website\"},\"datePublished\":\"2008-08-27T15:05:39+00:00\",\"dateModified\":\"2008-10-15T09:38:36+00:00\",\"author\":{\"@id\":\"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/55ae8f6885bb5b8390dad001f3da83c6\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.myfatblog.co.uk\/#website\",\"url\":\"http:\/\/www.myfatblog.co.uk\/\",\"name\":\"Blog of an overweight SharePoint addict\",\"description\":\"The rantings of a (not so) food obsessed IT consultant!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.myfatblog.co.uk\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/55ae8f6885bb5b8390dad001f3da83c6\",\"name\":\"Cimares\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/www.myfatblog.co.uk\/images\/BlogImages\/About_D057\/TopOfTheWorld.jpg\",\"contentUrl\":\"http:\/\/www.myfatblog.co.uk\/images\/BlogImages\/About_D057\/TopOfTheWorld.jpg\",\"caption\":\"Cimares\"},\"sameAs\":[\"http:\/\/www.myfatblog.co.uk\"],\"url\":\"http:\/\/www.myfatblog.co.uk\/index.php\/author\/reginald\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to brand your WebPart solutions.. - Blog of an overweight SharePoint addict","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/","og_locale":"en_US","og_type":"article","og_title":"How to brand your WebPart solutions.. - Blog of an overweight SharePoint addict","og_description":"So you&#8217;ve written a nice web part solution, ready to release it onto your clients environment, but wait a minute! How do they know you wrote it for them? All you&#8217;ve got is those generic icons that microsoft provide you. This is the situation i found myself in recently, and realised that with my change &hellip; Continue reading","og_url":"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/","og_site_name":"Blog of an overweight SharePoint addict","article_published_time":"2008-08-27T15:05:39+00:00","article_modified_time":"2008-10-15T09:38:36+00:00","author":"Cimares","twitter_card":"summary_large_image","twitter_creator":"@cimares","twitter_site":"@cimares","twitter_misc":{"Written by":"Cimares","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/","url":"https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/","name":"How to brand your WebPart solutions.. - Blog of an overweight SharePoint addict","isPartOf":{"@id":"http:\/\/www.myfatblog.co.uk\/#website"},"datePublished":"2008-08-27T15:05:39+00:00","dateModified":"2008-10-15T09:38:36+00:00","author":{"@id":"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/55ae8f6885bb5b8390dad001f3da83c6"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myfatblog.co.uk\/index.php\/2008\/08\/how-to-brand-your-webpart-solutions\/"]}]},{"@type":"WebSite","@id":"http:\/\/www.myfatblog.co.uk\/#website","url":"http:\/\/www.myfatblog.co.uk\/","name":"Blog of an overweight SharePoint addict","description":"The rantings of a (not so) food obsessed IT consultant!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.myfatblog.co.uk\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/55ae8f6885bb5b8390dad001f3da83c6","name":"Cimares","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.myfatblog.co.uk\/#\/schema\/person\/image\/","url":"http:\/\/www.myfatblog.co.uk\/images\/BlogImages\/About_D057\/TopOfTheWorld.jpg","contentUrl":"http:\/\/www.myfatblog.co.uk\/images\/BlogImages\/About_D057\/TopOfTheWorld.jpg","caption":"Cimares"},"sameAs":["http:\/\/www.myfatblog.co.uk"],"url":"http:\/\/www.myfatblog.co.uk\/index.php\/author\/reginald\/"}]}},"_links":{"self":[{"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/88"}],"collection":[{"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":0,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.myfatblog.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}