23

How to activate feature via Managed Client Object Model: public void ActivateFeature(string webFullUrl,Guid featureId,bool force,FeatureDefinitionScope featdefScope) { using (var ctx = new ClientContext(webFullUrl)) { var features = ctx.Web.Features; ctx.Load(features); ctx.ExecuteQuery(); features.Add(featureId, force, ...


21

I know exactly what you're looking for. While a debate about proper link tag usage and CSS storage folders is always a fun topic, realize none of that is your issue here. There are two components that allows you to add <link> tags to Page Layouts. First, you need to find the following lines of code in the head of the Page Layout's HTML page: <!--...


9

You can export the template however you must manually modify the exported WSP for it to import properly. Or as Microsoft says, it isn't supported, http://support.microsoft.com/kb/2492356.


9

You can use this method: function ActivateFeature(featureGuid) { var clientContext = new SP.ClientContext.get_current(); var site = clientContext.get_site(); var guid = new SP.Guid('{'+featureGuid+'}'); var featDef = site.get_features().add(guid, false, SP.FeatureDefinitionScope.site); clientContext.executeQueryAsync(Function.createDelegate(this, this....


9

In addition to Milind's answer: it is not good practice to put html directly into the CEWP just because you can. For one, it will only work on some kinds of pages. Web part pages are fine, wiki pages will chew the html. Secondly, it will be hard to maintain, since you will need to edit the web part itself every time you want to make a change. As an ...


8

Every SharePoint site is (on general) the same, where the only difference is what features are activated. A Publishing site have the site scoped Publishing infrastructure feature activated, and the web scoped SharePoint publishing feature activated. By this a library or list can make use of Major and minor versions (with history) Content approval Check out/...


7

In the most concise terms I can think of - a Page Layout is used to display content, a Master Page governs the look and feel for the whole site. A Page Layout has an associated content type, therefore it stores content, and a page derived from a Page Layout will store the content in the content type's fields. A MasterPage does not have a content type and ...


7

Just a try : replace the Lookup Column definition with this one : <Field ID="{2FF1B484-6D70-449c-8E5C-904E4D5971E1}" Name="PageCategory" Group="Intranet Columns" Type="Lookup" DisplayName="PageCategory" List="Lists/Categories" ShowField="Title" PrependId="TRUE" Overwrite="TRUE" /> Doesn't know why, ...


7

try to use this query: SPQuery q = new SPQuery(); q.ViewAttributes = "Scope=\"Recursive\"" q.Query = "<Where><Geq><FieldRef Name='CheckoutUser' LookupId='TRUE'/><Value Type='int'>0</Value></Geq></Where>"; var pages = pagesList.GetItems(q);


7

$siteUrl = "http://ukreddy:3456/" $siteCollection = Get-SPSite $siteUrl Enable-SPFeature "PublishingSite" -Url $siteCollection.Url -force Enable-SPFeature "PublishingWeb" -Url $siteCollection.Url -force http://ukreddysharepoint2010.blogspot.co.uk/2014/05/error-systemargumentexception-value.html Sharepoint was failing to activate the feature PublishingWeb. ...


7

Publishing functionality is a set of two features, one at the Site Collection level and one at the Site level. You can activate them on any site like Team site, Document Center, Wiki site etc… You will find all the info on what publishing adds in that link, but here I want to showcase some reasons why I use Publishing for my clients. The publishing site ...


6

The type of pages available by default (wiki vs. article and web part pages) is the primary difference. Since wiki pages in 2010 allow for web parts to be inserted, many people are now choosing enterprise wiki sites over publishing sites. The only big thing you lose with wiki sites over publishing sites are page layout templates. Wikis have some basic ...


6

There are a few things that control this in site settings --> navigation. Managed Navigation -- use a term set for navigation Add new pages to navigation automatically -- a new item is added to the termset for each new page Create friendly URLs for new pages automatically -- This is what you're concerned about - the page shows up in the URL without the ....


6

This issue most frequently occurs because the Community Sites or the SharePoint Server Publishing feature is currently enabled or was previously enabled for the affected site. SharePoint doesn’t support creating a template from a site where publishing or community features were enabled. This is because the publishing feature creates site elements that are ...


6

Every major version will in UIVersion be based on version * 512, so you will have to compare on 1536. For completeness Minor versions will increment the version with 1, and every major with 512. So 0.1 is 1 1.0 is 512 1.1 is 513 2.0 is 1024 2.1 is 1025 and so on


5

Have you tried this? <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <!-- ... --> <SharePoint:ScriptLink runat="server" Name="/SiteAssets/js/jquery/jquery-1.6.2.min.js" Localizable="false" />


5

As each my "mysite" is a new site collection using a Microsoft Site Definition, there is no no-code solution for automatically adding web parts to a page. (Well there is one no-code solution: Someone could sit in central administration add refresh the list of "mysites" and when he sees a new one he could log in and add the web parts, but I think that after a ...


5

rjcup, Your client is likely not the right entity to ask what solution is best. If you're the developer, then you should know best and if your client doesn't trust your judgement, then your client has a problem much greater than how to get something done. If that client knows more about SharePoint than you do, then you have a quite different problem as well....


5

To add what John said, Publishing sites are better when you are doing a .COM public facing site, when you need more publishing controls, more control over who can author, edit & publish, and when you want to enforce a specific look & feel & brand.


5

I prefer not to create sub-sites for navigational structure alone - mainly because it is hard to change the structure again. But you actually have some good alternatives when you are willing to create a custom navigation data source. Below are two options that will also not require you to create folders in your Pages library. They also make it harder to ...


5

Take a look to this link that explain How propagation works: http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/12/sharepoint-2013-variations-content-synchronization-between-source-and-target-variations.aspx Also check the timer jobs that are responsible of the propagations and the Variations log. From the link: Custom lists and ...


5

Yes there are four List Event Receivers: ListAdding(SPListEventProperties) ListAdded(SPListEventProperties) ListDeleting(SPListEventProperties) ListDeleted(SPListEventProperties) You may be interested in first two. See here for more info: http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.splisteventreceiver.listadding(v=office.14).aspx ...


4

If you're working in SharePoint Designer, then you can use a plain old tag instead and reference the .js file anywhere you want: <script language="javascript" type="text/javascript" src="/Scripts/jquery.SPServices-0.6.2.min.js"></script> Any relative path will work, whether it's in _layouts, a Document Library, or an external CDN.


4

Simplest possible code to just get page and folder names is: using(SPSite site = new SPSite("http://myCoolSite")) { using(SPWeb web = site.OpenWeb()) { SPList pageList = web.Lists["MyCoolPageLibrary"]; // Get items foreach(SPListItem item in pageList.Items) { // item.File.Name } // Get ...


4

There are (at least) three ways of achieving this in SharePoint 2010. 1) Custom Site Definition. They are hard-core and somewhat old-school, and require access to the file system. Generally we try to avoid these nowadays, other than as a simple one to be used for feature stapling. 2) Site Template. Now a realistic option because of the new Web Template ...


4

SharePoint pages already include a #mainContent anchor that you could reuse: <a href="#mainContent">Back to Top</a> I think it is also associated with the accesskey J.


4

You could use PowerShell for this. The most tricky part is checking in/out and approving depending on what type of publishing is enabled, and weather pages are already checked out by others. Check out the stub code below. Included two methods to ensure that checkout and approve is done correctly depending on setup. A couple of things to note: BE AWARE ...


4

You have to use SiteDataQuery as replied by Thomson above. Here is some sample code SPWeb web = SPContext.Current.Site.RootWeb; SPSiteDataQuery query = new SPSiteDataQuery(); //Server template for page library is 850 query.Lists = "<Lists ServerTemplate='850' Hidden='TRUE' />"; query.ViewFields = @"<FieldRef Name='URL' Nullable='True' Type='...


4

Normally, pages created in site/SitePages wont have the Publishing tab because versioning on these Library types are set to "Create major versions" . Major versions do not require Publishing as it creates a new major version when you check-in, save. Pages created in site/Pages will have the publishing because that Library type is set to create "major and ...


Only top voted, non community-wiki answers of a minimum length are eligible