october cms: basic seo

within the layout/theme: <title>{{ this.page.title }}</title> <meta name=”title” content=”{{ this.page.meta_title|default(this.page.title) }}”> <meta name=”description” content=”{{ this.page.meta_description}}”> <meta name=”keywords” content=”{{ this.page.meta_keywords}}”> inside the component: $this->page->title = “abc”; $this->page->meta_description = “abc”; $this->page->meta_keywords = “abc”;  

october cms: relations

Resources: https://octobercms.com/docs/database/relations https://octobercms.com/docs/backend/relations Example: This is a (hopefully correct) working example of a 1 to n relation. // product model public $hasMany = [ ‘variants’ => [‘\Acme\Namespace\Variant’], ]; // variant model public $belongsTo = [ ‘product’ => [‘\Acme\Namespace\Product’], ]; public $attachOne = [ ‘my_image’ => [‘System\Models\File’], ]; # variant fields.yaml Read more…

october cms themes

Resources: https://octobercms.com/docs/themes/development#theme-information https://octobercms.com/docs/cms/themes Basic Layout: Here is a sample structure of a october theme. the layout file combines the header and the footer into a working layout, which can be used for pages. layout_header.htm <!doctype html> <html class=”no-js” lang=”de”> <head> <meta charset=”utf-8″> <meta http-equiv=”x-ua-compatible” content=”ie=edge”> <title>{{ this.page.title }}</title> <meta name=”title” Read more…