Setting preview image for Sharepoint 2010 custom web template - image

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 -->

Related

ASPX extension not showing when browsing site from VS2013 IDE

i have created a web site with VS2013 IDE and my .net framework version is 4.5.
i select default webform template with no authentication and IDE generate project with many code and aspx file.
when i run my code from IDE then aspx extension is not showing. i comment this code in RouteConfig.cs file
//var settings = new FriendlyUrlSettings();
//settings.AutoRedirectMode = RedirectMode.Permanent;
//routes.EnableFriendlyUrls(settings);
but still aspx extension is not showing. so tell me what i need to change as a result aspx extension should be shown.
Doing that is enough to remove friendly URLs for me, you do also have to edit your Site.Master etc to change the links from ~/About to ~/About.aspx for example.
Otherwise, check for other URL rewriting as described in Scott Gu's blog: https://weblogs.asp.net/scottgu/tip-trick-url-rewriting-with-asp-net

Images/Imagebuttons in SharePoint sandboxed Webpart

New to developing for Sharepoint Online but I'm familiar with how to deploy/package web parts to both local Sharepoint and Sharepoint Online.
Trying to create a basic webpart that contains numerous image links or image buttons to run various links to different libraries and functions. The webpart will activate fine but what I'm struggling with is getting the images to display once deplyed to Sharepoint Online.
If I include the image in the web part solution and deploy it to the local Sharepoint, the image displays correctly but when packaged and uploaded the image won't display. I've googled a fair bit and tried different ways of adding the image as embedded resources in the Web Part package .wsp but none seem to work.
I know I can only make the web part in sandboxed form for use with Sharepoint online, so I can map to the Sharepoint images folder, and really need the image/icon files to be packaged with the .wsp.
Do i need to include the image files in a specific location within the solution for them to be packaged and referenced?
You need to add the images through a module
Url can be any document library.
<Module Name="Pics" Url="PathToDocLib">
<File Path="yourPicture.png" Url="Pics/yourPicture.png" />
</Module>

How to change a theme in MVC4

It seemed like I can download jquery theme I like from jquery site to create new theme. But that does not change much in my MVC site. Can anybody tell me how I can change theme in MVC4 application?
As I understand your question:
How can I replace the base theme in a MVC4 application with a custom generated theme from the jquery ui theme roller?
My steps for my razor MVC4 visual studio 2012 application created from some MS standard template for intranet application. jQueryUI already was installed in my application with the base theme from nuget.
Created the theme using http://jqueryui.com/themeroller/ and downloaded the zip to some temp folder
Extracted the jquery-ui-1.10.3.custom.js into my Scripts folder
Edited my RegisterBundles method in the file App_Start/Bundle.Config
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include("~/Scripts/jquery-ui-1.10.1.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include("~/Scripts/jquery-ui-1.10.3.custom.js"));
Extracted the css subfolder named for my custom theme (e.g. my-theme) into the themes folder "Content/themes/my-theme".
Comment out the base theme lines in App_Start BundleConfig.cs and replaced the big base theme StyleBundle with the single-file bundle
bundles.Add(new StyleBundle("~/Content/themes/my-theme/css").Include(
"~/Content/themes/my-theme/jquery-ui-1.10.3.custom.css"));
//bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
// "~/Content/themes/base/jquery.ui.core.css",
// "~/Content/themes/base/jquery.ui.resizable.css",
// ...
Finally replaced the base-theme bundle call in my layout.cshtml with the new one.
#Styles.Render("~/Content/themes/kjr-theme/css")
#Styles.Render("~/Content/themes/base/css")
If there is a better or cleaner way to replace the theme in MVC4 applications, please let me know!
Michael
Since jquery ui version was changed, jquery ui scripts in MVC4 template seem to be not compatible with current version of jquery ui. So you can't just copy css directory of downloaded jquery ui to your theme folder of MVC4, and expect it would be applied for your site.
So what I did was to replace jquery.ui.theme.css with corresponding part in jquery.ui.custom.css. And new theme was correctly shown in my MVC4 site now.
Code Project site uses an implementation of Chris Pietschmann
Code Project:
http://www.codeproject.com/Articles/32847/ASP-NET-MVC-Dynamic-Themes

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

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).

Silverlight app Image not showing at runtime

In Visual Studio 2010 I have created a new project with the Silverlight Business Application template. I added an Images folder under the Assets folder. The png files in this folder have Build Action set to Resource, and Copy To Output Directory set to Always. In the header section I added an <Image Source="Assets\Images\logo.png" /> element. In design time it displays my image. At runtime it does not.
Any idea as to why my image is missing at runtime?
--Shawn
I had a similar problem with images showing in design-time, but not at runtime. Mine was using a pack URI so I wanted to post that fix as well:
Does not work at runtime, does work at design-time:
<Image Source="TelerikDemo;component/Images/logo.png" />
Works at both design and runtime:
<Image Source="/TelerikDemo;component/Images/logo.png" />
Note the extra '/' before the Pack URI starts.
hmf! Turns out my backslashes needed to be forward slashes!

Resources