Try our conversational search powered by Generative AI!

WebForms: CurrentPage property refers to start page from within a local block

Found in

Release 7.5

Created

Sep 25, 2014

Updated

Jan 16, 2015

Area

Falcon/CMS/Edit UI/Editing

State

Closed, Fixed and Tested


Steps to reproduce

Steps to reproduce:


1. The Alloy template has a StartPage page type that has a SiteLogotypeBlock property.
\wwwroot\Models\Pages\StartPage.cs

The property looks like the following.
public virtual SiteLogotypeBlock SiteLogotype { get; set; }

2. Modify the renderer for this page type.
\wwwroot\Views\Blocks\SiteLogotypeBlockControl.ascx

Add the following to the render to output the CurrentPage.Name property.
<p>CurrentPage.Name: <%: CurrentPage.Name %></p>

3. Create an instance of the page lower in the page tree so that CurrentPage is not set to the start page by default.

4. Navigate to the page in edit mode.

5. Edit the logo. You should see fields for Url and Title.

6. Notice that initially the CurrentPage.Name shows the correct value.

7. Notice that once you edit, the CurrentPage.Name property shows "Start", the name of the start page.

This does not affect view mode.