I have a template in use and a webpage. If a user wants to create a new project, the user should click on a link/button. This would generate around 36 new pages, all with links to each other. Also, the links should automatically be added to the list of projects on the previous level.

Is this possible? How do I go about doing it?



How about creating a visual web part with a button? Then in the Button.Click event you would provision each of these pages. The tutorial I used to make my first web part is found here: http://blog.concurrency.com/sharepoint/create-a-custom-web-part-for-sharepoint-2010/

As far as links to each other, you could use relative links if they are always provisioned in the same structure.

You can add the link to the project landing page to the top navigation of the root site programmatically as well. Check out this code sample:

// -- Add to Quick Launch --
Navigation.SPNavigationNode nodeChild =
    new Navigation.SPNavigationNode(web.Title, strUrl);

Navigation.SPNavigationNodeCollection ncQuickLaunch =
foreach (Navigation.SPNavigationNode node in ncQuickLaunch)
    if (node.Title == "Sites")
| improve this answer | |
  • thanks for your reply. I only just saw this comment. This seems like it should work, but I will try this method out and get back with the results. – Guwanjith Aug 2 '12 at 16:31
  • Awesome. Sounds good. I know this worked for me (pulled it from a project). – RJ Cuthbertson Aug 2 '12 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.