MODx 本地开发设置/系统

发布于 2024-11-24 02:50:47 字数 479 浏览 3 评论 0原文

我是 MODx 的新手,但它的功能和灵活性给我留下了深刻的印象。只有一个警告,我希望这只是因为我不知道更多。

我是一名前端开发人员,我习惯于构建各种规模的网站。但我通常使用文件和版本控制。我如何在 MODx 中保持这种范例?

从我到目前为止的探索来看,我发现使用 IDE 的唯一方法是将静态文件与我的代码一起保存,以便稍后复制/粘贴到 MODx Manager 中。远非理想。

我知道很多人使用“包含”片段来包含片段、块等。这适用于 MODx 特定标签吗?例如,如果我将一个文件作为片段包含在内,并且在其中定义了一个模板变量(或一个资源链接),那么它会正确呈现吗?

另外,与将片段代码输入 MODx Manager 相比,通过包含文件来使用片段是否会影响性能?

底线是,如何在 MODx 上开发网站?您在哪里输入代码?是否有类似“导入 HTML”的功能,但适用于片段和块?有没有办法在不通过管理器的情况下创建新的模板、文档、块、电视等?

提前致谢!

I'm new to MODx, but am quite impressed with its power and flexibility. There's only one caveat, and I'm hoping it's just because I don't know any better.

I'm a frontend dev, and I'm used to building websites of all sizes. But I usually work with files and version control. How would I keep this paradigm with MODx?

From my poking around so far, the only way I found to use an IDE, is to keep static files with my code, to later on copy/paste into MODx Manager. Far from ideal.

I'm aware that a lot of people use an "include" snippet, to include snippets, chunks, etc. Does this work for MODx specific tags? For example, if I include a file as a snippet, and I have a template variable defined in there (or a resource link), would that be properly rendered?

Also, is there a performance hit using a snippet by including a file, vs having the snippet code entered into MODx Manager?

Bottom line, how do you develop sites on MODx? Where do you enter your code? Is there a feature like the "Import HTML" but for snippets and chunks? Is there a way to create new Templates, Documents, Chunks, TVs, etc. without going through the Manager?

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

少钕鈤記 2024-12-01 02:50:47

有一个用于 modx 开发的完整文档站点, http://rtfm.modx.com/display/ Revolution20/Home - 尽管它主要涉及扩展它 - 不是定制和定制修改。简短的回答是否定的,您的代码片段和代码片段没有版本控制。这样,是的,您将必须手动维护它们。 [我希望情况并非如此]

你的大部分 php 代码将进入片段或插件,是的,你可以在这些资源类型中包含静态文件,不,我不知道是否有性能增益/损失,但如果你的包含内容是可缓存的,我想“不”。
对于包含,您可以执行以下操作:

include_once $modx->config['base_path'].'_path_to_my.php_';

-肖恩

there is a whole documentation site for developing in modx, http://rtfm.modx.com/display/revolution20/Home - though it mostly concerns extending it - not customization & modification. The short answer is no, there is no version control for your snippets & such, yes, you will have to maintain them manually. [I wish that was not the case]

Most of your php code will go into either a snippet or a plugin, and yes you can include static files in either of those resource types, no, I on't know if there is a performance gain/loss, but I would imagine "no" if your include is cache-able.
for the includes you can do something like this:

include_once $modx->config['base_path'].'_path_to_my.php_';

-sean

国粹 2024-12-01 02:50:47

VersionX 用于革命,它允许您对块、片段、资源等进行版本控制。

There is VersionX for revolution that will allow you version control of chunks, snippets, resources and so on.

野侃 2024-12-01 02:50:47

有一个名为 Auditor 的包,它允许您在 Modx 中实现版本控制

EDIT

抱歉,刚刚注意到您的问题被标记为“革命”,审核员适用于 Evo。我认为目前还没有可用的解决方案,尽管我相信它已在路线图中

There is package called Auditor that will allow you to implement version control in Modx

EDIT

Sorry just noticed your question is tagged Revolution, Auditor is for Evo. I don't think there's a solution available yet although I believe it is on the Roadmap

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文