I created a simple Filter Web Part with a Content Editor WP and simple XLST to filter List/Library with the LIKE feature. It works for lists and libraries (in libraries not for Name field). Create a page with Library Web Part to filter. Then add a Content Editor Web Part end edit HTML Source. In HMTL, add an input textbox and two buttons, for reset filter and for submit filter. Add some script as shown below: <script type="text/javascript"> //this script get query string from URL function querySt(ji){ hu = window.location.search.substring(1); gy = hu.split("&"); for (i=0;i<gy.length;i++){ ft = gy[i].split("="); if (ft[0] == ji){ return ft[1]; } } } //this script set value read from query string in input field function setValues(){ if(querySt('qtitle') != null && querySt('qtitle') != "") { document.getElementById('query_title').value = query
In multilanguage site feature, Sharepoint 2010 does not translate content of web part and metadata. We have to find a way to show to user content or metadata in current language. I used a list with columns with content in language and a lot of jquery to show and hide columns for current language. I have a list with "DescriptionIT" and "DescriptionEN" columns. Then, I set a view with both columns visible. In this view, I added a content query web part whit code below. In this code, I search for current language, i.e. "Italian", then search for column with "DescriptionIT", and hide all columns but "DescriptionIT" (with name starting with "Decsription"). Result is that if I change language (with Select Display Language), I see only column in respective language. Simple and cross platform. Here the code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type=&quo
I show you a detailed example of how to enable and disable a ribbon button according to the current user’s group. The example uses “EnabledScript” attribute of the CommandUIHandler of the ribbon button. Then the EnabledScript is built with EcmaScript to find groups and user info. Lets Start with creating a Ribbon button first. 1. Create a empty project. 2. Deploy it as a Farm solution. 3. Right click on the feature and click “Add feature”. 4. Right click on the project and add a new “Empty Element” item. 5. Next add the below code to add a custom Ribbon button to your document library. <Elements xmlns=”http://schemas.microsoft.com/sharepoint/” > <CustomAction Id=”ButtonForGroupUsersOnly” Location=”CommandUI.Ribbon” RegistrationId=”101″ RegistrationType=”List” Title=”Owners Group Button”> <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition Location=”Ribbon.Library.ViewFormat.Controls._children”> <Button Id=”Ribbon.L
Comments
Post a Comment