Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.2 KiB

Asset

Properties

  • type String Asset type, eg. 'image'.
  • src String Asset URL, eg. 'https://.../image.png'.

getType

Get asset type.

Examples

// Asset: { src: 'https://.../image.png', type: 'image' }
asset.getType(); // -> 'image'

Returns String

getSrc

Get asset URL.

Examples

// Asset: { src: 'https://.../image.png'  }
asset.getSrc(); // -> 'https://.../image.png'

Returns String

getFilename

Get filename of the asset (based on src).

Examples

// Asset: { src: 'https://.../image.png' }
asset.getFilename(); // -> 'image.png'
// Asset: { src: 'https://.../image' }
asset.getFilename(); // -> 'image'

Returns String

getExtension

Get extension of the asset (based on src).

Examples

// Asset: { src: 'https://.../image.png' }
asset.getExtension(); // -> 'png'
// Asset: { src: 'https://.../image' }
asset.getExtension(); // -> ''

Returns String