Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Set default block for content area in existing page types

Vote:
 

Hi,

I have converted static footer into a block and content area.

now I want to set this block as default for all pre-existing pages.

don't want content authors to set this footer block manually for each page

Any suggestions?

#208167
Oct 16, 2019 9:45
Vote:
 

Hi Jayesh,

You can create a schedule job to traverse the content tree and set the value on each page.

or you can refer this.

https://world.episerver.com/blogs/Hans/Dates/2012/1/Batch-Update-EPiServer-Page-Properties-after-Creation/

#208169
Edited, Oct 16, 2019 9:51
Vote:
 

Hi Jayesh,

If this footer is setup once and used across all pages, you can take the approach used in the Alloy site which is to create a custom view model for all of your pages which contains the relevant references to the footer contents. You can then call the construction of that view model in your controllers.

#208172
Oct 16, 2019 11:16
Vote:
 

Hi Jayesh,

In this thread there is a simple solution suggested by Aniket

https://world.episerver.com/forum/developer-forum/Developer-to-developer/Thread-Container/2018/4/managed-header-footer/

That will be helpful.

#208189
Oct 17, 2019 5:13
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.