- Seme Framework
- version 4.0.3
- Requirements
- Download & Install
- Configuration
- Tutorials
- URI Routing
- Constants
- Global Variables
- Model
- View
- Controller
- cdn_url
- config
- constructor
- getAdditional
- getAdditionalBefore
- getAdditionalAfter
- getAuthor
- getCanonical
- getContentLanguage
- getDescription
- getIcon
- getJsContent
- getJsFooter
- getJsReady
- getKey
- getKeyword
- getLang
- getRobots
- getShortcutIcon
- getThemeElement
- getTitle
- input
- lib
- load
- loadCss
- loadLayout
- putThemeContent
- putJsContent
- putJsFooter
- putJsReady
- render
- resetThemeContent
- session
- setAuthor
- setCanonical
- setContentLanguage
- setDescription
- setIcon
- setKey
- setKeyword
- setLang
- setShortcutIcon
- setTheme
- setTitle
- Library
- CLI (command line interface)
- Core
- Issue
- Deployment
CDN URL Method
The cdn_url
method purpose is to load assets file with CDN URL prefix.
Basic Usage
Here is the basic usage for cdn_url
method from SENE_Controller class.
$this->cdn_url(string $location): $this
Parameters
cdn_url has 1 parameter there is $location.
$location
Value for $location can be an relative url without CDN URL prefix.
The Configuration
The CDN URL purpose is to create base url for CDN usage. Here is example codes on development.php file.
...
$cdn_url = 'https://cdn.cenah.co.id/';
...
Example Usage
Here is the example usage cdn_url in a view file.
...
<div class="logo-container">
<img src="<?=$this->cdn_url('assets/images/logo-cenah.png')?>" class="logo-fluid" alt="logo Cipta Esensi Merenah" />
</div>
...