Skip to content

Commit

Permalink
feat: add pageclass snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Mar 22, 2023
1 parent 0047ba7 commit f2be261
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .vscode/ProcessWire.code-snippets
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
{
// namespace
// Namespace
"ns": {
"prefix": "ns",
"body": ["<?php namespace $1;", "$0"]
},

// Custom Page Class
"pageclass": {
"prefix": "pageclass",
"body": [
"<?php",
"namespace ProcessWire;",
"use RockMigrations\\MagicPage;",
"class $1Page extends Page",
"{",
" use MagicPage;",
"",
" const tpl='$2';",
" const prefix='$2_';",
" $0",
"}"
]
},

// RockFrontend
"rf": {
"prefix": "rf",
Expand Down

0 comments on commit f2be261

Please sign in to comment.