使用自己的代码覆盖空间,可能还有空间(Override space with own code, and potentially the space)
我需要重新映射
<Space>
来运行MyFunction()
(在正常模式下),然后根据MyFunction()
的处理结果,它应该可以作为普通空间工作,即向右移动光标。 怎么做到这一点?例如:光标位于“[]”,按空格更改为“[x]”,光标不移动。
示例:光标位于“一个字”,按空格键向右移动光标(正常模式)。
I need to remap
<Space>
to runMyFunction()
(in normal mode), and then depending on the result of processing ofMyFunction()
, it should be possible for it to work as normal space, i.e. move cursor right. How to accomplish this?Exmaple: cursor is at "[ ]", pressing space changes that to "[x]", cursor doesn't move.
Example: cursor is at "a word", pressing space moves cursor right (normal mode).
原文:https://stackoverflow.com/questions/37858094
最满意答案
制作模块时,如果您仍希望page.ss仍包含在模板中,请不要忘记文件夹布局
/portfolio /portfolio/code /portfolio/templates /portfolio/templates/Layout
也可以将您的模板放在/ themes / yourtheme_portfolio /(yourtheme是您主题的名称),请参阅http://doc.silverstripe.org/framework/en/topics/theme-development themes / yourtheme_forum / folder。
When making a module, don't forget the folder layout if you still want page.ss to still be included in the template
/portfolio /portfolio/code /portfolio/templates /portfolio/templates/Layout
Can also put your template in /themes/yourtheme_portfolio/ (yourtheme is the name of your theme), see http://doc.silverstripe.org/framework/en/topics/theme-development themes/yourtheme_forum/ folder.
相关问答
更多-
制作模块时,如果您仍希望page.ss仍包含在模板中,请不要忘记文件夹布局 /portfolio /portfolio/code /portfolio/templates /portfolio/templates/Layout 也可以将您的模板放在/ themes / yourtheme_portfolio /(yourtheme是您主题的名称),请参阅http://doc.silverstripe.org/framework/en/topics/theme-development themes / yo ...
-
SilverStripe 3.1+站点不会输出Page.ss模板内容(SilverStripe 3.1+ Site will not output Page.ss template content)[2021-11-07]
托管空间已经用完了。 这导致了所描述的行为。 不是SilverStripe问题或网站问题,而是托管问题。 我会留下这个问题/答案,因为它可能会帮助将来困惑的人。 The hosting had run out of space. This was causing the described behaviour. Not a SilverStripe issue or site issue but a hosting issue. I'll leave this question / answer up as ... -
使用FieldGroup类 public function getCMSFields($fields) { $fields = parent::getCMSFields($fields); $fields->addFieldToTab('Root.Main', FieldGroup::create( new HeaderField('+36'), new TextField('PhoneNumber','') ...
-
嘿,谢谢你的建议,但我认为它是针对插件域名? 我只想要一个子域用于测试目的。 我最终做的是避免在服务器上安装Silverstripe,而是将其安装在我的笔记本电脑上,然后将其上传到服务器。 复制相应的数据库并将Silverstripe的BaseURL修复为'/'后,它工作正常 Hey thanks for your suggestion but I think it was meant for addon domains? I only wanted a subdomain for testing purp ...
-
主题仅影响前端。 后端不使用它们。 你需要把模板放在你的mysite/目录下,或者你的$project 。 Themes only affect the frontend. The backend does not use them. You'll need to put the template in your mysite/ directory, or whatever your $project is.
-
使用Composer将SilverStripe 3.0升级到3.1失败(SilverStripe 3.0 upgrade to 3.1 failure with Composer)[2023-11-06]
你不应该编辑cms / composer.json,你应该在项目的根目录下编辑composer.json(如果有一个存在 - 如果以前的开发人员没有安装,可能没有composer.json作曲家)。 You shouldn’t be editing cms/composer.json, you should be editing the composer.json at the root of your project (if there is one present - there may not be ... -
进入管理员,然后单击BlogHolder页面。 现在转到设置并更新每页帖子的字段 Go into the admin, and click on the BlogHolder page. Now go to settings and update the field for Posts per page
-
Locales是 FluentExtension扩展中的一个函数 : /** * Templatable list of all locales * * @return ArrayList */ public function Locales() { $data = array(); foreach (Fluent::locales() as $locale) { $data[] = $this->owner->LocaleInformation($locale); ...
-
只需添加 SiteTree: extensions: - CommentsExtension comments: require_login: true 在/mysite/config.yml中 然后只需“/ dev / build?flush = 1” Just add SiteTree: extensions: - CommentsExtension comments: require_login: true in /mysite/config.yml ...
-
自定义SilverStripe模块安装到供应商文件夹中(Custom SilverStripe Module gets installed into vendor folder)[2022-09-12]
我认为你的问题是你的自定义“存储库”条目。 通过定义“包”条目,您将告诉作曲家包的属性,它不会查找存储库的composer.json 。 因此,要么通过添加“type”和其他字段来完全定义“package”条目,要么只使用“vcs”条目(将使用您的存储库中的composer.json )。 例如。 "repositories": [ { "type": "vcs", "url": "git@xxx:xxx/sync.git" } ] 简而言之:对于拥有自己的 ...