PageDataCollection myPages = GetChildren(myParentPage);
If you want the URL to be in the same language as the page is, instead of:
string url = page.LinkURL;..start using AddLanguageSelection and pass the page´s language ID:
string url = EPiServer.UriSupport.AddLanguageSelection(page.LinkURL, page.LanguageID);
" this is a test string "
Using Trim() would get rid of the extra white spaces in the beginning and the end, but it would still leave you with:
"this is a test string"
So how to handle all extra white spaces, even those within the string? We'll lets use some regular expression for that:
// Remove extra white-spaces within a string
text = Regex.Replace(text, @"\s+", " ");
Here's how to do it:
- Edit the page with your changes. Leave publish dates as is, you will set your date elsewhere.
- Select "Save and view" (NOT PUBLISH!)
- Two buttons are displayed, click "Ready for publish".
- Goto the version list tab.
- Last in the listing where your new version is there's a time schedule icons to the right. Click on it.
- Tick the activate checkbox and enter time and date as you please.
- Save and your new version of the page is now awaiting automatic publishing.
Please note, that if you do another version of your page you'll need to go through these steps again.
EXEC sp_change_users_login 'Auto_Fix', 'user'
And a small celebration! This is the 100th post :)