In the documentation of the portal I see it having a section for adding a page. It appears that this is mainly for additional FAQ’s or such. I did not however see how to add a new “page” page to the customer portal. Although most developers, BSA, and even administrators may be able to figure this out on their own this is how I accomplished the task.
First you have three basic types of pages. The list view, a form view and just content page. In some cases the form view is completely on its own, other times it is essentially tied to the list view for editing purposes of individual records in the list. The case list>edit case for example. We are adding a new simple form. Adding a new list is a little different and will require another blog entry
We need more than one type of contact us page on our website. There a number of steps involved in added a new page.
You have the Portal itself where you will need to create a new web form using a master page. The customer portal is set up with a Master page. This is where the design of the page is held. Most of this can be changed from with in CRM from the site settings. The things you would not be able to change would be the actual placement. I have not seen an actual page designer.
Start by adding a page to your solution with a master page.
If you are mimicking another page it is easy enough to just copy the code to your new page and make changes. The important lines are:
<crm:CrmEntityFormView runat=”server” ID=”FormView” DataSourceID=”WebFormDataSource” EntityName=”lead” SavedQueryName=”Newsletter Web Form” OnItemInserted=”OnItemInserted” ValidationGroup=”ContactUs”>
I also need to change the name of the asp:panel ID and its reference in the code behind.
The savedQueryName should be the name of the view that you are going to add in CRM. This controls what displays on the page.
Other items that you will need to change are verify
‘<%$ Snippet: ContactUs/Submit, Submit %>’
The “Snippet” concept. Any of these little “Snippets” are stored in CRM. You could just hard code text on the page if you wanted, but that defeats the purposed of tying this to the CRM itself. With the Snippet you can make changes to the page with out every writing any code in the actual VS project. Obviously you would need a developer to set up the anchors and then an administrator can make changes from there.
In the .cs of the page you may need to make changes. Make sure all the references are there..
Now you need to go back into crm. I do the code first then add the information to CRM but technically I think you can do it either way.
From the main menu you will go to Content Management which is where your sites are stored. The following are elements you will need to add.
Page Template – You need a page template to tell the system where exactly you page is within the site. Name your page. This is what will display in the title. If you do not set the title on the Web page in the next step.
Select the website, and rewrite url. Interesting this is the terminology used. This will the relative path to your page with in the actual website. This is the “real” page.
Determine if it is to be the default page. And Save.
Web Page: this will reference the Page template. For consistency purposes I named my template and page the same. Again select your website. Select a parent page if there is one. The parent page does impact site map, which in turn affects navigation. Add a the partial url. I have been doing these as absolute paths from the site name. I am not 100% that this is being done correctly but it is working..
Set the page template to the one you just made or make a new one in this step. You can set the display dates if needed. Leave blank if this is a prement page.
Title: will dispay as the title of the page
Copy: The text that will display on the page. This needs to be in HTML format.
Web Links Sets: If you want the page to display on the portal navigation you will need to add it to the appropriate navigation and set the order.
Code snippets: this is where you add additional text to specific places with in your page. For this it is a confirmation message when they click the submit button.
Run your project and you page should be there. Changes that are made inside CRM are heavily cached. Sometimes it takes several tries of running the remove cache page, saving the web config and other cache deletion strategies to see changes. That can be frustrating. And it makes it difficult to know when you have made changes in the wrong place or if the cache has just not caught up.
Viewing the Customer Portal as the basis for essentially a content management system, I think this is a pretty good solution. It has a lot of the ground work done for you. With a little poking around it is pretty easy to figure out what you need to do to make changes. I would not however classify this as a No-development needed solution. I have read some information that the “paid for” version from Adx Studios would not require this amount of work to add a new page. Can not verify that information at this time.
Now that I have reviewed the customer portal Administration guide thoroughly. I have decided to see how far the add a page functionality takes us before I post this blog. I am not a huge WYISWYG editor individual, so when I clicked on the “new page” button I was greated with a nice little generic error message “An error has occured while loading content required for this feature”…. not suprised.
Good thing this fellow bloggist has posted the solution…http://jianwang.blogspot.com/2011/05/customer-portal-2011-error-has-occurred.html ok, not complete solution to error you then have to do this http://forums.asp.net/t/1195663.aspx which states you can only have one type of authentication. Well if you looked at my Implementing eService authentication you will see I need windows integrated authentication.. which this states I need to turn off…. conundrum! Fix. Set windows integrated auth and anonymous on the main Virtual Directory for your site, then on the services/crm.sv page uncheck integrated auth. you will have to restart IIS to get these permissions to stick.
So once you add a page.
In the new page dialog you are given the opportunity to select an existing page template. There a ton out of the box. This solution does not create an actual new page in the VS solution. If the pages that are included are not going to fulfill the needs of the new page being added then the rest of this blog post will be necessary.
“Page” seemed like the most logical template to choose. It will need all of the guts to be added to actually use the page for content. I only get access to change the header links, and footer upon saving and creating this new page.
So from what I gather. This is still not a complete no-code necessary add page solution.