My problem goes, as the title says, create web pages programmatically of multiple solutions on SharePoint 2010; because when I do deploy one solution the program recognize my site templates and I can create without problems, but when I do deploy two solutions the program not recognize second site templates. Normally I have 50 site templates on 1033 and each solution add 3 templates to 1033, but at the end I only find 53.
this.webTemplates = site.RootWeb.GetAvailableWebTemplates(1033);
int a = this.webTemplates.Count;
//a = 53 =(
When I re-run the application I find the 56 templates but I need to make deployment both solutions in one and found all templates. So, there some service I have to restart or update some element?
Thanks in advance! And sorry if my English is not so good.
Related
I am totally new to dotnetnuke and have installed dnn6 comunity edition. i m trying to develop a dnn module to.
Display Detailed News
Display top 8 news on homepage (from where navigate to the Display Detailed News)
i am using installed web starter kit as template and vs .net2010 and development env.
In this regard i have 3 questions.
How to add user control to display TOP 8 NEWS to the existing module so that i may add it as New module from control in dnn site?
How to display different category of news in this control on different page?
1) You will need to either create a new Module Definition, add the Control as another option to an existing Definition, or even define a completely new module on the extensions page that uses the new ASCX file. Most likely you will do the first option, adding to a ModuleDef to existing module. Then when you add the module to a page, you'll actually get two different modules loaded on the page. You can delete the one you don't want to use. The DNN blog module does this with like 5 or 6 different controls that get added to the page.
2) You'll want to configure Module Settings for the ASCX that control which category the articles come from.
If you really are serious about doing module development I would encourage you to check out my VS Templates, instead of the starter kit You can find the DNN6/VS2010 templates in the .9 release http://christoctemplate.codeplex.com/releases/view/93348
All the newer releases are for Visual Studio 2012 (even the free versions work though, so check those out)
Like the title says, I'm looking for a way to restrict user creation of blogs in MySites. I've been researching this for the past few days and can't seem to find a good option.
Presently, I'm hiding the links to create a blog through a custom Master page. I'm using feature stapling to add the custom Master page to MySites which is working; however, not really a 'best practice' since using the URL to create the blog site will still work.
I also don't want to manually change files in the SharePoint root directory structure as it is a poor practice in an upgrade path.
I would appreciate any insight...
If you're hosting MySites in a separate Web Application, you can use an Event Receiver (derived from SPWebEventReceiver and implementing WebAdding) and check that the WebTemplate is BLOG.
We have a sharepoint environment with many sites (and sometimes many site collections). Each site (or site collection) has the same default page with some custom webparts that use sitecolumn values (for example a projectcode or clientcode) to show information from external systems. (for each project we have to create a separate site (or site collection) because of other reasons)
What is the best approach to minimize duplication? The dynamic parts of the page are stored in site columns. When we add a new webpart, ideally the default page every site/page should show the new webpart without spreading the update to the individual pages
Thanks
One approach you may want to take is to use the web part as a wrapper for a user control. The user control does the heavy lifting on the site. Once the web part is included on your pages, the user control should be able to tell which site it is being executed on and pull the necessary dynamic data from your site columns.
When you need to make updates, you update the user control and then redeploy the solution package to the farm. Each site will pick up the change as soon as the solution is deployed.
Here is a little information about this approach:
http://msdn.microsoft.com/en-us/library/ff649867.aspx.
The above article relates to WSS 3.0, but that should give you a starting point.
An approach you may want to look at for SharePoint 2010 is a visual web part. More info can be found here: http://msdn.microsoft.com/en-us/library/ff597539.aspx.
I need to be able to deploy bunch of aspx files when a site (sub-site aka web) is provisioned. I added a feature but it seems whole feature thing has changed with vs 2010 or sp2010. I am totally lost. All I want to do is to deploy these pages when a web is provisioned. Is it possible?
You can't drop aspx pages into SharePoint per say. If you want to add functionality, some of the options are:
1) Using Web Parts - probably the most popular method
2) User Controls
At the end of the day, you will create it as a Feature using VSeWSS 3.0 in VS and packaging/deploying it as a solution. Steer clear of trying to hack this up in SharePoint Designer - for one, you won't have source control like you have with a Feature.
http://www.andrewconnell.com/blog/articles/UsingCodeBehindFilesInSharePointSites.aspx
http://www.codersbarn.com/?tag=/webpart
Does anyone know where to get the site theme for SharePoint 2010 that microsoft is using for the Adeveture Works site? I saw it once, but cant find it now. I want to brand our site close to that.
The theme you are looking for is coming from nightandday.master which is available in publishing site, as soon as you create a publishing site nightandday.master page is set as default.
Let me know in case if you need more information.
Adventure Works is a generic name that Microsoft uses for several demo sites (much like Contoso). Adventure Works is certainly the logo that shows for the out of the box NightAndDay.master but there are other Adventure Works master page designs available from Microsoft. Currently they are only available for SharePoint 2007 but that will change in the near future. Here is one (I can only post one link because I'm new):
http://bit.ly/oEExq
Randy Drisgill - MVP SharePoint Server | My Blog: blog.drisgill.com | My Book:
www.amazon.com/gp/product/0470584645/