I've been messing with SPNavigationProvider, PublishingWebs, and etc for the past few days and I can not figure out how to move a node in /_layouts/areanavigationsettings.aspx programmatically.
The node I need to move is in the list of the Global Navigation, but when I query the SPPublihsingWeb.GlobalNavigationNodes it is not listed. When I call IncludeInNavigation() on the web I need in GlobalNavigationNodes, there is no change.
I'm doing this through a Feature Activation if that makes any difference.
I appreciate any help.
Thanks.
You probably want to do similar things I just did: Deploy custom Navigation / SiteMap via Feature?.
Instead of using the Publishing Site, why not use the SPWeb.Navigation?
Check out the following MSDN entry on Adding Links through Object Model - just iterate over the Children of SPWeb.Navigation and you will find your link and will be able to modify it.
Related
I'm a new user to TFS
I would like to add a custom field to a work item in a project in my project collection.
My expectation is to add a custom field("BizID") to a work item "task" from **c# code behind.**
I would like to know what all are possible ways to add a custom field to a work item?
P.S: I dont need a Process Template interruption to do this and Also not using WIT.
Some references will help. Thanks in advance.
At present time, in order to add a field to a process template in on-premise TFS, you need to modify the process template XML. There's no way around it.
You may be able to avoid using a process template customization by using some combination of custom backlog columns and tags, however. It depends on the data you want to capture.
As Daniel mentioned, modify the process template is the only way to modify a work item type.
Besides modifying work item type definition, you can also download and install TFS Power Tool, which will simplify the process of add a field. TFS Power Tool provides a UI to add fields. You can check this tool and follow this blog:
http://blog.infostructure.co.nz/2013/05/how-to-addedit-field-in-team-foundation.html
I'm having issues with Umbraco when trying to get access to a node by it's url.
I've been trying to form an xpath query to select on the url, but I've no idea how to do that, and everything in their API is a 'dynamic' so I'm finding it impossible to dig much deeper for other methods.
The "Link to document" property in the Umbraco editor shows the path to be "/links/link-regions/link-region-1/". Its location in the editor is "/Data/Links/Link Regions/Link Region 1".
I suspect it'll look like this, but I cna't make it work:
//*[#url='/links/link-regions/link-region-1/']
I basically want to know what I have to do to get the node by providing either of these values and no others. I've been trying to do this for days now to no avail, please help!
If you're using Umbraco 4.11 or later, there are a new set of APIs that allow you to retrieve strongly-typed content (as opposed to dynamic - which can be frustrating when trying to evaluate types when debugging).
UmbracoContext.Current.ContentCache.GetByRoute(string url) should do what you want.
[Final EDIT] Here is a link to the code I wrote in case it helps anyone.
I think I have a solution. Umbraco uses asp.net files for their popups
which is something I haven't used yet but I think I can get the hang
of it. I don't know how to access the aspx from within my class,
should I make a code behind partial class?
Thanks for any help.
I am developing a multi-lingual site, using Umbraco, where content nodes are automatically copied to each language as they are created. Is there any way to implement a custom popup to confirm that it should be copied to all instead?
This wouldn't actually be on the site, rather in the back office.
Or is it possible to open a browser popup with c# as all I really need is a bool value from a message box?
[EDIT: added possible solution]
I sorted this by adapting Umbraco's own create function. I made a new .aspx file and added the functionality that I needed to the code behind.
I was able to add a context menu item that allowed me to call my new page and from there called a method to duplicate the content.
From the method, I pass the new node and get the parent id. Then I compare all the node names for those that match and use the umbraco document.copy() method to recreate the content under each language at the correct position.
If I can make the code more generic then I will upload it as a package to Umbraco.
I'm trying to create a Keynote Tag via the Revit 2012 API. However, I found now reference to creating a Keynote Tag anywhere on the internet or in the samples. I see that the BuiltInCategory.OST_KeynoteTags is part of the IndependentTag class and according to http://thebuildingcoder.typepad.com/files/guide-to-placing-family-instances-with-the-api.doc you need to use the TM_ADDBY_CATEGORY TagMode to create a Keynote. However, when you then try to change the new Tag via ChangeTypeId, you get an error.
Has anyone figured this out?
I haven't had a chance to try yet, but I'm thinking you're out of luck.
For the most part, you can't do things with the API that you can't do interactively in Revit. I did quickly test that you can't change the type of a multi-category tag to be a keynote tag.
While they're both IndependentTag elements, they are different Categories, and it's very rare in my experience where you can switch the category of a placed element.
I am trying to make a web part that will display what links got clicked/viewed the most across the whole site collection. These links come from a SharePoint list.
Is there a mechanism in the object model that can be used to accomplish this?
Any thought would be helpful.
If the links all go to SharePoint pages within your portal, then you might be able to gather the information in your Site Usage Report, then query that in a custom web part. If the links point to places outside your portal, I am not aware of any out-of-the-box record of which links are getting clicked on in a SharePoint list. You could possibly make some javascript to add special code to the list interface so that, whenever a link is clicked, it first records to a database, then takes the user to the destination.