Friday, April 18, 2014

SharePoint 2013/2010 - Remove Columns Name from Group View

 To remove the column name from group view and retaining the collapse and expand option,copy and paste the below javascript in the page using content editor or script editor.

JavaScript (SharePoint 2013/SharePoint 2010):
<script type="text/javascript" language="javascript">
        _spBodyOnLoadFunctionNames.push("HideHeaders");
        function HideHeaders() {
            var elements = getElementsByClassName(document, "td", "ms-gb");
            var elem;
            for (var i = 0; i < elements.length; i++) {
                elem = elements[i];
                elem.childNodes[0].childNodes[1].nodeValue = "";
                elem.childNodes[1].nodeValue = elem.childNodes[1].nodeValue.replace(':', '');
            }
            elements = getElementsByClassName(document, "td", "ms-gb2");
            for (var i = 0; i < elements.length; i++) {
                elem = elements[i];
                elem.childNodes[1].childNodes[1].nodeValue = "";                elem.childNodes[2].nodeValue = elem.childNodes[2].nodeValue.replace(':', '');
            }
        }
        function getElementsByClassName(oElm, strTagName, strClassName) {
            var arrElements = (strTagName == "*" && oElm.all) ? oElm.all : oElm.getElementsByTagName(strTagName);
            var arrReturnElements = new Array();
            strClassName = strClassName.replace(/\-/g, "\\-");
            var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
            var oElement;
            for (var i = 0; i < arrElements.length; i++) {
                oElement = arrElements[i];
                if (oRegExp.test(oElement.className)) {
                    arrReturnElements.push(oElement);
                }
            }
            return (arrReturnElements)
        }
    </script>

Thanks to Source Article: http://amitphule.blogspot.com/2011/10/hiding-group-headers-from-sharepoint.html  

Happy Browsing!
Relax..

Wednesday, April 16, 2014

SharePoint  - Remove Columns Filter from List view

In order to remove the filter option from the list view and retain he sort, 
  1. Open the list view in the SharePoint Designer.
  2. Search for the inside   or column name that you want to hide filter option. The columns can be initially seen like this -
  3. Add the tags LinkToItem="TRUE" Filterable="FALSE" FilterDisableMessage="No filter available " tot the field names to hide the filter. After adding the tag looks like this -  
This will hide the column filter  and retains the sorting option in the list View. To take off the sorting , add Sortable="FALSE". 



Happy Browsing!
Relax..

Saturday, April 5, 2014

SharePoint 2013 - Image Slider from Content Query webpart with no coding

5 easy steps to create image slider from content query webpart with no coding!

I was looking for the image slider that can configured easily and effective with using OTB feature and I got different methods but some where I felt this can be made independent. Hence I used the blog from this article and image slider from basic Slider site and I merged with Content query webpart to get easy to use image slider.

Now to start in details

  1. Configure the content type as shown in this article.  ( this is used to order images and filter images) 
  2.  Create a picture library in your site and upload your images of same size. Now edit properties of the images, select the Slider Content Type (if you configure from step 1) then enter title, comments, url, sort order, start and end dates  etc for the images. This will be used to determine which image to be shown in the slider and in which order. 
  3.  Upload these files to any document library or style library or with your custom master page. 
  4.  Now, on the page where the image slider to be displayed, add a content query webpart and   open its property by edit mode. In the query part -Select the picture library you created as image source and in the presentation - select the newly configure content type and filter order. You can check this article for the details). After this you can now see the images lined up on you page. 
  5.  Now add a content editor webpart and set the source to slider.html from the document library where you uploaded the attached files.

Script files to Download 

PS: You can have different sliding styles with slider1.html . I have used images of size 950 * 240. So if you have different image size, you can change it in the style sheet and slider.html. Feel free to post me any query or comments. Thanks to both articles for providing such a beautiful articles.


Happy Browsing!
Relax..