{"id":13411495,"url":"https://github.com/daxslab/yii2-website-module","last_synced_at":"2025-06-12T06:05:48.031Z","repository":{"id":47925229,"uuid":"174627138","full_name":"daxslab/yii2-website-module","owner":"daxslab","description":"Yii2 Website Module","archived":false,"fork":false,"pushed_at":"2021-08-11T20:24:53.000Z","size":178,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-31T20:45:58.359Z","etag":null,"topics":["cms","content","module","pages","website","yii2"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daxslab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-08T23:55:05.000Z","updated_at":"2022-06-02T08:32:07.000Z","dependencies_parsed_at":"2022-08-12T14:20:48.385Z","dependency_job_id":null,"html_url":"https://github.com/daxslab/yii2-website-module","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-website-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-website-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-website-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daxslab%2Fyii2-website-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daxslab","download_url":"https://codeload.github.com/daxslab/yii2-website-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251753689,"owners_count":21638367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cms","content","module","pages","website","yii2"],"created_at":"2024-07-30T20:01:14.061Z","updated_at":"2025-04-30T17:43:35.817Z","avatar_url":"https://github.com/daxslab.png","language":"PHP","funding_links":[],"categories":["Web Development"],"sub_categories":["PHP"],"readme":"Yii2 Website Module\n===================\n\n[![Latest Stable Version](https://poser.pugx.org/daxslab/yii2-website-module/v/stable.svg)](https://packagist.org/packages/daxslab/yii2-website-module)\n[![Total Downloads](https://poser.pugx.org/daxslab/yii2-website-module/downloads)](https://packagist.org/packages/daxslab/yii2-website-module)\n[![Latest Unstable Version](https://poser.pugx.org/daxslab/yii2-website-module/v/unstable.svg)](https://packagist.org/packages/daxslab/yii2-website-module)\n[![License](https://poser.pugx.org/daxslab/yii2-website-module/license.svg)](https://packagist.org/packages/daxslab/yii2-website-module)\n\nYii2 module to implement a website.\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist daxslab/yii2-website-module \"*\"\n```\n\nor add\n\n```\n\"daxslab/yii2-website-module\": \"*\"\n```\n\nto the require section of your `composer.json` file.\n\nIntroduction\n------------\n\nWebsite tries to be an unobstrusive CMS without limiting the capabilities of Yii2 framework as development platform. The idea is that you can add website features to an existing application, or just create a website based on Yii2 framework.\n\nThe idea behind **Website** module is a bit different compared with other CMS. While generally pages, posts and categories are managed, in **Website** everything is a page and every page can have children pages so,\n\n- a page without subpages can be considered a regular _page_\n- a page with subpages can be considered a _category_\n- a subpage can be considered a _post_\n\nThe resulting tree can then have wathever depth is required. \n\nBesides pages, **Website** also manages Media: any attached file that can be referenced in the resulting website. The module handles the uploading process.\n\nAlso you can manage Menus with **Website** module. For every menu you can create menu items and this than be pointed to any URL. When creating a menu item you either type the label and URL, or select from existing pages.\n\nConfiguration\n-------------\n\nWebsite is meant to be used with the Yii2 Advanced Application template. Some modification could be done to make it usable with basic template.\n\n### Module\n\nFirst configure the module for all the apps in common/config/main.php\n\n\t//...\n\t'modules' =\u003e [\n\t\t'website' =\u003e [\n\t\t\t'class' =\u003e daxslab\\website\\Module::class,\n\t\t\t'languages' =\u003e ['en', 'es', 'it'],\n\t\t\t'token' =\u003e 'some-string-here'\n\t\t]\n\t]\n\t//...\n\nHere notice the specified attributes:\n- languages: array with the languages that will be active for creating content\n- token: string identifying every website in case that several are used. \n\n### Database\n\nIt is assumed that you are using some database and that the connection to it it's already set. Configure migrations in console/config/main.php\n\n    //...\n    'controllerMap' =\u003e [\n        'migrate' =\u003e [\n            'class' =\u003e 'yii\\console\\controllers\\MigrateController',\n            'migrationNamespaces' =\u003e [\n                'daxslab\\website\\migrations',\n            ]\n        ],\n    ],\n    //...\n\n### Controllers\n\nConfigure controllers namespaces for the module in each app. Let's start with frontend/config/main.php\n\n\t//...\n\t'modules' =\u003e [\n\t\t'website' =\u003e [\n\t\t\t'controllerNamespace' =\u003e 'daxslab\\website\\controllers\\frontend'\n\t\t]\n\t]\n\t//...\n\nAnd similar for backend/config/main.php\n\n\t//...\n\t'modules' =\u003e [\n\t\t'website' =\u003e [\n\t\t\t'controllerNamespace' =\u003e 'daxslab\\website\\controllers\\backend'\n\t\t]\n\t\n\t]\n\t//...\n\nUsage\n-----\n\nThe module provides two sets of controllers: frontend and backend.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaxslab%2Fyii2-website-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaxslab%2Fyii2-website-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaxslab%2Fyii2-website-module/lists"}