{"action":"created","issue":{"url":"https://api.github.com/repos/modxcms/evolution/issues/764","repository_url":"https://api.github.com/repos/modxcms/evolution","labels_url":"https://api.github.com/repos/modxcms/evolution/issues/764/labels{/name}","comments_url":"https://api.github.com/repos/modxcms/evolution/issues/764/comments","events_url":"https://api.github.com/repos/modxcms/evolution/issues/764/events","html_url":"https://github.com/modxcms/evolution/issues/764","id":179049968,"number":764,"title":"Manager Theme-Engine - Concept","user":{"login":"Deesen","id":8569221,"avatar_url":"https://avatars.githubusercontent.com/u/8569221?v=3","gravatar_id":"","url":"https://api.github.com/users/Deesen","html_url":"https://github.com/Deesen","followers_url":"https://api.github.com/users/Deesen/followers","following_url":"https://api.github.com/users/Deesen/following{/other_user}","gists_url":"https://api.github.com/users/Deesen/gists{/gist_id}","starred_url":"https://api.github.com/users/Deesen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deesen/subscriptions","organizations_url":"https://api.github.com/users/Deesen/orgs","repos_url":"https://api.github.com/users/Deesen/repos","events_url":"https://api.github.com/users/Deesen/events{/privacy}","received_events_url":"https://api.github.com/users/Deesen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-24T20:24:23Z","updated_at":"2016-09-25T10:11:06Z","closed_at":null,"body":"According to #688 I have brainstormed a lot and already tried some \"proof-of-concepts\" which can be seen here using the \"Change Password\"-action (requires installation of snippet `[[mgrTpl]]`) https://github.com/Deesen/evolution/tree/mgr-template . I think I have a promising one:\r\n\r\n-------------------------\r\n\r\n[/manager/media/style/common/engine.php](https://github.com/Deesen/evolution/blob/mgr-template/manager/media/style/common/engine.php)\r\n[/manager/actions/mutate_password.dynamic.php](https://github.com/Deesen/evolution/blob/mgr-template/manager/actions/mutate_password.dynamic.php)\r\n- TemplateEngine/API gets loaded via class ManagerAPI, available as `$modx->manager->tpl`\r\n- The API fills a matrix/array as mentioned in #688. This matrix can be filled with parent/children elements. \r\n- a custom `engine.php` is possible to add new CSS/JS-files or replace the default ones (for Bootstrap)\r\n\r\n-------------------------\r\n\r\n[/manager/media/style/common/tpl](https://github.com/Deesen/evolution/tree/mgr-template/manager/media/style/common/tpl)\r\n- These elements will be rendered using template-files (like chunks)\r\n- custom-templates are possible for example in `/media/style/bootstrap3/tpl`\r\n\r\n-------------------------\r\n\r\n[/manager/media/style/common/tpl/body.html](https://github.com/Deesen/evolution/blob/mgr-template/manager/media/style/common/tpl/body.html)\r\n- documentParser can now also parse \"manager-only\" snippets like `[[mgrTpl]]`. This snippet is used to render the matrix into HTML.\r\n \r\n-------------------------\r\n\r\n[/manager/media/style/common/tpl/actions/mutate_password.dynamic.html](https://github.com/Deesen/evolution/blob/mgr-template/manager/media/style/common/tpl/actions/mutate_password.dynamic.html)\r\n- This snippet can be used to render the complete matrix-tree or just parts of it.\r\n   Body: `[[mgrTpl?&get='element'&element='body']]`\r\n\r\n   Single element containing all its children \r\n   `[[mgrTpl?&get='element'&element='userform.pane1.tab1.section1']]`\r\n\r\n-------------------------\r\n\r\n[ManagerManager Example](https://github.com/Deesen/evolution/blob/mgr-template/manager/actions/mutate_password.dynamic.php#L80-L84)\r\n- Using the API it is possible to move elements around or create new elements\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/modxcms/evolution/issues/comments/249413517","html_url":"https://github.com/modxcms/evolution/issues/764#issuecomment-249413517","issue_url":"https://api.github.com/repos/modxcms/evolution/issues/764","id":249413517,"user":{"login":"Deesen","id":8569221,"avatar_url":"https://avatars.githubusercontent.com/u/8569221?v=3","gravatar_id":"","url":"https://api.github.com/users/Deesen","html_url":"https://github.com/Deesen","followers_url":"https://api.github.com/users/Deesen/followers","following_url":"https://api.github.com/users/Deesen/following{/other_user}","gists_url":"https://api.github.com/users/Deesen/gists{/gist_id}","starred_url":"https://api.github.com/users/Deesen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deesen/subscriptions","organizations_url":"https://api.github.com/users/Deesen/orgs","repos_url":"https://api.github.com/users/Deesen/repos","events_url":"https://api.github.com/users/Deesen/events{/privacy}","received_events_url":"https://api.github.com/users/Deesen/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T10:11:06Z","updated_at":"2016-09-25T10:11:06Z","body":"Perfect example how flexible the template-engine could become. To create Bootstrap-Tabs a separate list is needed to render the buttons (different from MODX´s webfxtabs that do not require additional markup). So I modified tab.container to render these tab-buttons using `[[mgrTpl]]`:\r\n\r\nhttps://github.com/Deesen/evolution/blob/mgr-template/manager/media/style/MODxBS3/tpl/tab.container.html\r\n\r\n"}}
{"actor":{"display_login":"Deesen"}}