I am able to create custom pages for a base type, but not for any of its derived types.
I copied a standard template from the PageTemplates folder to the CustomPages/{TableName} folder.
This works for the base type without a problem, but it doesn't work for derived types (I made sure that the CustomaPages/{TableName} folder name matches the table name in the database. When I run the website, it redirects me to the standard page rather than
to the custom page.
Hi guys thanks for the replies. I have a 'Product' class with subtype classes 'Led', 'LightPipe', and 'CardGuide'.
I have a added a custom page for Products under
DynamicData/CustomPages/Products/List.aspx.
<div>When I run the website, it correctly displays the custom page for Products.</div>
I have also added a custom page for the other subtypes under:
DynamicData/CustomPages/Leds/List.aspx
DynamicData/CustomPages/LightPipes/List.aspx
DynamicData/CustomPages/CardGuides/List.aspx
However, when I navigate to their respective subtype page, the custom page is not displayed. Instead, the standard "List.aspx" provided by DynamicData is displayed.
All of my other custom pages display correctly for all entities except for subtypes in a hiearchy (Led, CardGuide, and LightPipe). Thanks for taking the time to read this.
I think you essentially hit a limitation here. While there is some support for derived classes, I think the list page always uses the root of the hierarchy, and will show items of all the various derived types in there.
None
0 Points
4 Posts
Custom Pages for derived types
Aug 15, 2012 01:47 PM|bravemav|LINK
I am able to create custom pages for a base type, but not for any of its derived types.
I copied a standard template from the PageTemplates folder to the CustomPages/{TableName} folder.
This works for the base type without a problem, but it doesn't work for derived types (I made sure that the CustomaPages/{TableName} folder name matches the table name in the database. When I run the website, it redirects me to the standard page rather than to the custom page.
Is this a limitation of Dynamic Data?
Thank you for your time.
DynamicData
All-Star
94130 Points
18109 Posts
Re: Custom Pages for derived types
Aug 16, 2012 09:30 PM|Decker Dong - MSFT|LINK
Hi,
Can you show me your full codes?
Many thanks!
DynamicData
All-Star
17916 Points
5681 Posts
MVP
Re: Custom Pages for derived types
Aug 17, 2012 05:59 AM|sjnaughton|LINK
Hi bravemav, are you making the custom page folder name the Entity Name to the Entity Set Name as it must be the plural name?
Always seeking an elegant solution.
None
0 Points
4 Posts
Re: Custom Pages for derived types
Aug 17, 2012 10:54 AM|bravemav|LINK
Hi guys thanks for the replies. I have a 'Product' class with subtype classes 'Led', 'LightPipe', and 'CardGuide'.
I have a added a custom page for Products under
I have also added a custom page for the other subtypes under:
However, when I navigate to their respective subtype page, the custom page is not displayed. Instead, the standard "List.aspx" provided by DynamicData is displayed.
All of my other custom pages display correctly for all entities except for subtypes in a hiearchy (Led, CardGuide, and LightPipe). Thanks for taking the time to read this.
DynamicData
Contributor
3384 Points
1363 Posts
Re: Custom Pages for derived types
Aug 23, 2012 01:10 AM|davidebb|LINK
I think you essentially hit a limitation here. While there is some support for derived classes, I think the list page always uses the root of the hierarchy, and will show items of all the various derived types in there.
None
0 Points
4 Posts
Re: Custom Pages for derived types
Apr 22, 2013 07:58 PM|bravemav|LINK
The problem was solved by changing the folder name from plural to singular for subtypes (i.e. Leds -> Led, LightPipes -> LightPipe)