Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #260 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

Possibility to have an fallbackimage to usercontrols?

Reported by: erik@… Owned by: alexander@…
Priority: minor Component: EPiImage
Keywords: Cc:

Description

We usually have a MainImage and a ListImage on a page. If the ListImage is missing, we use the MainImage with ptb.
Is there a possibility to add a a property to the usercontrol called eg. "FallbackPropertyName"?

Change History

comment:1 Changed 6 years ago by alexander@…

  • Status changed from new to closed
  • Resolution set to fixed

You should use the page type definition in PTB for this.

The example shows how you can return the PageName if the property Heading hasn't been defined:

[PageTypeProperty(Type = typeof(PropertyString))]
public virtual string Heading
{

get
{

string heading = this.GetPropertyValue(page => page.Heading);
return string.IsNullOrEmpty(heading) ? PageName : heading;

}

}

Note: See HelpUser/Tickets for help on using tickets.