How can I add an icon in a SharePoint document library template? - image

i want to insert a image in a sharepoint document library template.
It should appear when I click Site Settings -> More Options -> in the Library selection.
I tried to manipulate the manifest.xml - File with the ImageUrl-Tag and it didn't help.
Is it possible? I've searched for many days an can't find anything.
THX

You want to add a preview image to a custom SharePoint document library you created, correct?
I'm assuming you have created a list template (specifically a document library template). In the elements.xml of that template you have the Image attribute which represents the preview image.
Here is an example elements.xml for a custom document library:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListTemplate
Name="MyList"
Type="10012"
BaseType="1"
OnQuickLaunch="TRUE"
SecurityBits="11"
Sequence="110"
DisplayName="My List"
Description=""
Hidden="false"
Image="/_layouts/images/itdl.png"
DocumentTemplate="121"/>
</Elements>
The document library will be shown with the image located at /_layouts/images/itdl.png as its preview image. You said you tried settings the ImageUrl attribute - this doesn't exist for a list template, though it would exist when you were creating a web template (see this SO post).

Related

How to display Bootstrap icons in Xamarin?

I'm new to Xamarin development, but try to be exact.
Using Visual Studio 2022, with Xamarin version 17.0.0.182 (as displayed in VS About).
Found this great article on how to use Bootstrap icons, but it seems to be out of date. When I followed the steps and provided hex codes for the characters, I didn't get the expected glyiphs.
I found that
new Xamarin needs new methods,
new Bootstrap fonts need new ways.
Here they are.
1.) Get the font from the Bootstrap github repo at https://github.com/twbs/icons
Go to releases (https://github.com/twbs/icons/releases), choose latest, scroll down to Assets, download the bootstrap-icons-x.x.x.xip file.
Unzip it, and find fonts/bootstrap-icons.woff.
Not something you can use in Xamarin right away :-(
2.) Convert the woff file to ttf
I googled for a converter and used https://cloudconvert.com/woff-to-ttf
Now you have the ttf you need :-)
3.) Now follow the current Xamarin method of adding a font to your app.
The process is described here: https://devblogs.microsoft.com/xamarin/embedded-fonts-xamarin-forms/
In short:
add the ttf file to the shared Xamarin project, Embedded Resources / Fonts
change file properties / Build Action to "Embedded resource"
register the font by adding a line to the end of Assemblyinfo.cs:
[assembly: ExportFont("bootstrap-icons.ttf", Alias = "Bootstrap")]
4.) Use it in xaml like
<Label FontFamily="Bootstrap" Text=""/>
to display a magnifying glass.
You may also define a Label style, but I'll skip that for now.
4/b.) To use it in xaml via binding
Oh, if things were easy...
When using a binding to display a glyph, there's one more hoop to jump, thanks to these guys for the solution: Using data binding, how do I bind text which contains emojis to a label and have it display correctly?
So, in xaml:
<!-- set BindingContext to MyViewModel -->
<Label FontFamily="Bootstrap" Text="{Binding StateIconName}" />
in your MyViewModel:
public string StateIconName
{
get => WebUtility.HtmlDecode("");
}
5.) To browse available glyphs (icons)
Open the overview page: https://icons.getbootstrap.com/
6.) To find the unicode character code, also referred to as "Unicode HTML Entity"
Check the name of the icon above in step 5.
Open the Bootstrap-icons.css file from Github: https://github.com/twbs/icons/blob/main/font/bootstrap-icons.css
Search for the name of the glyph to find the character code, something like:
.bi-zoom-in::before { content: "\f62c"; }
Use this code in xaml like

Supported Cultures Box not available in manifest

This msdn link says that to add more language to your windows phone app, you need to make changes in the supported culture box in the properties page, but I can't find such box in the properties page as well as manifest page.
I tried searching all the tabs and I have uploaded the screenshots of properties page as well as manifest, but I'm not able to find the required box.
I have developed an application and updated on the store but only English (US) is the supported language and I'm not able to localize the app.
I'm not able to add screenshots as it requires more that 10 reputation.
Adding resource files
You do not specify what languages you support in the project properties any more. You only specify the default language in the app manifest.
You have to manually add one .resw file for each language you support. The files must all be named Resources.resw and must be placed in a sub-folder, named after the language, under a “Strings” folder in your project.
Accessing resources from xaml
You access the resources by setting the x:Uid property of a control to a unique name. Unfortunately the x:Uid property is not recognized by the properties window, neither in VisualStudio nor in Blend, so you must hand code it directly in the xaml file.
Example:
<TextBlock x:Uid="MyTextBlock" /> <Button x:Uid="MyButton" />
<TextBlock x:Uid="MyTextBlock" />
You must then add a resource with the uid-name with dot-notation, that is, after the dot you write the name of the property of the control in which you want the text.
Reference : http://www.jayway.com/2014/04/22/windows-phone-8-1-for-developers-localizing-apps/

Where to Store NopCommerce Custom Theme/Views?

I'm new to ModX and have Experirnce with MVC3. I have a PSD that im coding into HTML and CSS. When I open the NopCommerce solution in Visual Studio, I see the themese folder. Is that where my custom theme assets should be saved?
After building the solution, do I need to run the prepare and deploy batches and copy deploy folder contents in order for changes to take effect?
Finally, where in the source code do I change Manufacturers to Restaurants?
Thanks for your help.
Themes go in Nop.Web.Themes. Create a folder there named after your theme and include your Content and Views folders. You should also have a theme.config XML file in your folder like this:
<?xml version="1.0" encoding="utf-8" ?>
<Theme title="YOURNAME"
supportRTL="false"
previewImageUrl="~/Themes/YOURNAME/preview.png"
previewText="YOURDESCRIPTION">
</Theme>
If your site is already running, you should be able to just move your Theme folder to it for changes to take effect.

Setting preview image for Sharepoint 2010 custom web template

I have a custom Sharepoint 2010 Web Template and I would like to set a custom preview image for it in the Sharepoint add site gallery.
Example (I wanna set a custom image for the "Project Template Site" custom web template):
Note: I already tried setting the ImageUrl property of the WebTemplate element (http://msdn.microsoft.com/en-us/library/ff408392.aspx) and it is not working..
I've managed to solve my problem. Apparently the ImageUrl property of the template element only works with relative URLs (and I was trying to set it to an absolute URL).
<WebTemplate
(...)
ImageUrl="/_layouts/images/example.PNG" /> <!-- Works -->

How to add icon on Customize Toolbar?

I am trying to add a button on the Customize Tool Window on Firefox 4
My folders look like this:
addon
|- content
|- om
|- xul
|- browser.xul
|- browser.css
|- skin
|- default
|- icon.png
My chrome.manifest file:
content orkutmanager content/om/
content orkutmanager content/om/ contentaccessible=yes
skin orkutmanager default skin/default/
locale orkutmanager en-US locale/en-US/
overlay chrome://global/content/browser.xul chrome://orkutmanager/content/xul/browser.xul
My browser.xul file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="chrome://orkutmanager/content/xul/browser.css"?>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="orkutmanager-button" label="OM"
class="toolbarbutton-1 chromeclass-toolbar-additional"
tooltiptext="Orkut Manager"/>
</toolbarpalette>
</overlay>
Accessing chrome://orkutmanager/content/xul/browser.xul gets me to a blank page, which means the file was found. (Should something be rendered?).
Accessing chrome://global/content/browser.xul gets me to an error page:
Firefox can't find the file at jar:file:///C:/Program Files (x86)/Mozilla Firefox 4.0 Beta 7/omni.jar!/chrome/toolkit/content/global/browser.xul
Isn't this file supposed to exist? Did it move? How can I add an icon on the Customize Toolbar window?
Apparently I should post this as an answer for accepting:
http://forums.mozillazine.org/viewtopic.php?f=38&t=934345
seems to demonstrate roughly the problem you are looking at. However, you commented that this was not correct entirely, but that it did lead to you finding the problem which was the inclusion of the filename in a different place.
For others fighting the same problem, ensure that all the new paths are up to date.
Thanks.
Instead of chrome://global/content/browser.xul it is chrome://browser/content/browser.xul.
I found a page, here, where it is explains very well how to achieve this.
In another documentation page, I found:
The CSS file with your toolbar styles
needs to be included in the overlay
file, as you would expect, but also in
the chrome.manifest file. This is very
important because the toolbar
customization dialog won't work
correctly without this. The way to
include the file in the manifest is to
add this line:
style chrome://global/content/customizeToolbar.xul chrome://xulschoolhello/skin/toolbar.css
The documentation is very messy, I was looking at one about Firefox 1.5 when I copied the url. :S

Resources