register locale css file in master page in SharePoint 2010 - sharepoint

How can i register locale css file in master page with using SharePoint Designer in website having different variations.
Like following line render style library folder
masterpage :
render: http://localSP/Style Library/MyFolder/sn.css (Correct)
How can i register css in master page so that it provide following
required render: http://localSP/Style Library/fr-FR/MyFolder/sn.css (if its French varition)
masterpage :
Thanks

I think you have to manually create that css file under french variation. fr-FR is a sub-site, so try to navigate there and put the artifact there.

Related

How to have H1 and byline in the master page - Kentico

I'm trying to work out a way I can add my H1 and byline markup to my Root master page and then have all the pages underneath fill these fields in. I'm using the Portal Engine development mode.
The H1 and byline are in a different web part zone to the page placeholder. They are showing on all the pages under my root node but I can't find a way to make populate the title or byline on those pages.
I've tried a few things:
- editable text web part - but this is only editable on the Root node and not the pages underneath
- I thought maybe I could use <%# Eval("Byline" %> and add this as a field to the Page type but that doesn't show through either.
Is there any way to include something in the master page that is dynamically filled in (or editable in the designer) on all pages under the root node? Or do I need to move myH1 and byline out of the master page and include in every template that my pages use?
You can add additional field to your page type named 'Byline'. This field will be editable on Form tab of each page. Then you can include some viewer web part like Document Viewer or repeater. Then configure Path like './' (it means to display information for current page). And add transformation where you cat do something like <%# Eval("Byline") %>.
Or alternative way is to use static html web part and add macro there {%CurrentDocument.Byline%}.
You can do it using macros: add a static text web part on your master and set text property to :
<h1>{%CurrentDocument.DocumentPageTitle#%}</h1>
or
<h1>{%CurrentDocument.DocumentName#%}</h1>
depending on where you keep your page title.

Kentico v9 javascript webpart and bottom load LinkedFile

In building on a previous question (Kentico v9 how can i detect when a user is in CMS desk with JavaScript), I have added a JavaScript webpart to load in my analytics.js file. Here's my code snippet:
<cms:JavaScript ID="js"
ViewMode="LiveSite"
LinkedFile="~/CMSPages/GetResource.ashx?scriptfile=/KFF/global/scripts/analytics.js"
LinkedFilePageLocation="beginning"
runat="server"></cms:JavaScript>
I can not figure out how to get this to load the JS file at the bottom of the page. What am i missing?
The Linked File Page Location is the key. There's one that renders it wherever the webpart is placed. You need to add a Web Part Zone at the bottom of the page and add them there, or if this is pure aspx then add this tag near the bottom, but the LInkedFilePageLocation should be Inline (i believe, see what the options are)
EDIT
The proper value is "startup" to make it render wherever you place it.

Additional Pages listed as Views in SharePoint 2007

The Situation:
I have customized the Bug Database template for SharePoint 2007 using SharePoint Designer. Specifically, I have edited the additional .aspx pages included with the template that are located inside the Bugs list. These are just simple edit forms and my customizations are very minor.
I have verified that the Supporting Files are correctly selected (New, Edit, Display). These forms have all been edited as well. I have the following .aspx pages (Non Views) in the Bugs List:
Activate.aspx
Close.aspx
DispForm.aspx - Supporting Display Form
EditForm.aspx - Supporting Edit Form
NewForm.aspx
ResolveForm.aspx
NewIssue.aspx - Supporting New Form
Resolve.aspx
The Problem:
On any of the views, the view dropdown contains 3 non views that correspond to the Activate, Close, and Resolve forms in addition to the actual view choices. Choosing these "views" just opens these forms.
Obviously, SharePoint is picking up any .aspx pages in the List that aren't supporting files and assuming they are views. Strangely, this was NOT the case for these files before I modified them using SharePoint Designer. Additionally, The NewForm.aspx page was NOT modified (I just created a new form that is now a supporting file), and even though it is not marked as a supporting file, it does not incorrectly show up in my views list.
The Conclusion:
There must be some setting to mark these files as non views without them being supporting files. I have looked through the NewForm.aspx and compared it to my modified forms and can find no obvious difference that should have any bearing on this.
Perhaps you have had this problem before or are aware of how to fix this issue? If so, here are some easy points! Thanks in Advance!
If they have been setup as a view (which it sounds like they have been), try making the <View> hidden to remove it from the view list
http://msdn.microsoft.com/en-us/library/ms438338.aspx
<View BaseViewID="1"
Type="HTML"
WebPartZoneID="Main"
DisplayName="Activate"
RowLimit="100"
ImageUrl="/_layouts/images/generic.png"
Hidden="TRUE"
Url="Activate.aspx">
I dont think you can make them <Form> elements, as it only accepts DisplayForm, EditForm, or NewForm
http://msdn.microsoft.com/en-us/library/ms478121%28v=office.12%29.aspx

How to add extra css to SharePoint 2007 site without reverting back to default theme

Currently I'm having trouble adding custom/my own css files to my SharePoint site. I add the custom/my own css files via the c# files (CssLink) as a web part and have them applied to my site's javascript files. Trouble is, whenever the css files were applied, my site goes back to the default blue-ish SharePoint theme color.
Is there any quick and simple way to avoid that from happening?
Thanks.
You can use this method to register a css file from a WebPart
Microsoft.SharePoint.WebControls.CssRegistration.Register("/.../mystyles.css")
or you can add the css file to the content place holder with the id "PlaceHolderAdditionalPageHead" which is present in the master page like this
var placeholder= Page.FindControl("PlaceHolderAdditionalPageHead");
var cssLink = new Literal();
cssLink.Text = "text";
placeholder.Controls.Add(cssLink);
Why don't you use, Site Settings, Master page and use the option "Specify a CSS file to be used by this publishing site and all sites that inherit from it." to specify your own CSS.
(Also, I have no idea what you mean with "via the c# files (CssLink) as a web part and have them applied to my site's javascript files". Are you missing some words in that sentence?)
You should have a very good reason to be adding CSSLink via C#. Have you considered packaging your CSS as your own theme?
SharePoint themes are easy to create and have many benefits such as:
a) Supported by Microsoft
b) Easy to create
c) Manageable by the end users.
d) You can apply different themes to different parts of the site.
e) etc etc...
The process of creating the theme can be found here:
http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Posts/Post.aspx?ID=122
I would recommend adding your theme via a feature only for adding and removing the theme. This would add a great deal of options for future tweaking.
Here is an example:
http://www.devexpertise.com/2009/02/11/installing-a-theme-as-a-sharepoint-feature/
I'm going to blog about this later this week so keep an eye out of you like. http://blog.zebsadiq.com
Upload your css in the syle library folder(or any library in side your site)
go to -->site actions-->site settings-->modify all site settings-->under look and feel tab-->click master page-->there is one option called alternate css url-->browse your custom css and click Ok.

How to modify Sharepoint filetype icons depending on parts of the filename?

We have a SharePoint Document library, where we store html files with links to external files. Samples:
mypicture.jpg.html
mywordfile.docx.html
mypdffile.pdf.html
and so on. Now by default all Files show up with the HTML Icon, referenced in the DOCICON.XML file. Thats of course correct as the .html extension shows, it is a HTML file. But we want the files to have different icons, based on their original file type.
Is there a way to automatically change the Icon
during rendering or
when we save the file to the library (via SharePoint API)?
Any other approachs?
Why not use a little jquery to change the icon during rendering? Each doc in your library should be contained in
<td class="ms-vb-icon"><a tabindex=...><img ... src="/_layouts/images/ichtm.gif"></a></td>
I think you can slurp that into an array, assign a new var that's just the href stripped of path/filename. and .html, and use that to replace htm in the src tag.
Could you not just edit the DOCICON.xml to add the ".jpg.html" and ".docx.html" extensions in?
For a full listing of icon files see all "ic*.gif" files in the TEMPLATE\IMAGES directory under the 12 hive. Unfortunately, this will not solve your problem, but this is where you can change it based on the extension, if you so choose.
Note that a blog I wrote a while back has a different focus, but does discuss where the icons come from: http://wiki.threewill.com/display/is/2007/10/14/External+Link+for+Editing+a+SharePoint+Document.

Resources