cancel
Showing results for 
Search instead for 
Did you mean: 
christian_p
Nintex Newbie

How to change the home page after creating a subsite

I've got a site workflow which creates a new sub site according to some parameters given.

Now I'm looking for a solution to change the head line of the home page.

Is there any solution available?

thx & br

Chris

Tags (2)
0 Kudos
Reply
9 Replies
pfudala
Nintex Newbie

Re: How to change the home page after creating a subsite

Hi,

I think the only way to achieve this via workflow is to use a PowerShell action.

https://nintexwfpowershellaction.codeplex.com/

After installing this action, you will be able to set a script as below :

Add-PsSnapin Microsoft.SharePoint.PowerShell  

$w = get-spweb http://mysite.site  

$r = $w.RootFolder  

$r.WelcomePage = "Pages/CustomHome.aspx"  

$r.Update()  

$w.Dispose()

Reply
christian_p
Nintex Newbie

Re: How to change the home page after creating a subsite

Hi Pierre,

thank you for your idea, but it doesn't meet my question.

I want to update/change the content of the page.

i.e.: <H1>template headline</H1> (as in the site template) should be changed to <H1>{Name of new created Site}</H1>

0 Kudos
Reply
pfudala
Nintex Newbie

Re: How to change the home page after creating a subsite

I read too fast, sorry...

But I think Powershell action still available to your needs.

What's the site template you use?

Is the home page a wiki page or a publishing page?

Reply
christian_p
Nintex Newbie

Re: How to change the home page after creating a subsite

It’s a WebPart-Page

Mit freundlichen Grüßen // Best regards

Christian Polz

0 Kudos
Reply
pfudala
Nintex Newbie

Re: How to change the home page after creating a subsite

Which template do you use?

I'd like to have a try on it before giving you the script snippet.

0 Kudos
Reply
christian_p
Nintex Newbie

Re: How to change the home page after creating a subsite

Hi,

It’s a custom template based on the team-site template.

The homepage has got a CEWP storing some welcome text, links, contact information, …

Nothing special, but I can’t share the template with you (sry for that).

Mit freundlichen Grüßen // Best regards

Christian Polz

Senior Consultant

0 Kudos
Reply
pfudala
Nintex Newbie

Re: How to change the home page after creating a subsite

Ok, I thought you had to edit a content "property" of the home page.

In fact, you need to edit the content of a webpart in the page.

It's a little bit harder but possible in PowerShell.

Here is a sample which could help you : Dev Help: Alter Content Editor Webpart Content using PowerShell

Reply
Automation Master
Automation Master

Re: How to change the home page after creating a subsite

‌ did you ever find a solution for this?

0 Kudos
Reply
christian_p
Nintex Newbie

Re: How to change the home page after creating a subsite

No, I still have to do this manually. Smiley Sad

0 Kudos
Reply