将 modx(内容管理)与 php 框架结合使用
我喜欢 CodeIgniter 进行 php 开发,但我有一个没有技术技能的客户想要对他的项目进行自己的更改地点。我教他如何在 MODx 中制作页面(这本身就是一项壮举)。是否可以使用 CodeIgniter 开发一个网站并使用 MODx 作为内容管理系统? MODx 会破坏框架吗?
I like CodeIgniter for php development, but I have a client with no tech skills that wants to make his own changes to his site. I taught him how to make pages in MODx (that was a feat in itself). Is it possible to develop a site with CodeIgniter and use MODx as the content management system? Will MODx mangle the framework?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的回答是“很可能”。 modxcms 很有可能自行处理所有路由、控制器操作等。可能没有简单的方法可以将其中一个插入另一个。
长答案是“这取决于”,然后是这些条件:modxcms 使用什么框架?它如何通过其index.php 文件处理调用? modxcms 的开销是多少?如果你想在 CodeIgniter 中管理路由,modx 会如何干扰?如果没有对代码进行一些重大重构,如何让这两个系统一起工作?
通常,坚持使用在您喜欢的平台上构建的 CMS 是最有意义的。对于 CodeIgniter,我所知道的唯一一个是 ExpressionEngine,它很好,但它很昂贵。如果您使用的是像 CodeIgniter 这样干净的东西,我体验过的其他 CMS(例如 Joomla 或 Drupal)将是一场灾难。
所以......不确定这是否真的对你有很大帮助,但我会在你不能(或至少不应该)将 CI 与 modx 混合的假设下进行操作。 IMO,仅使用 CI 就可以轻松创建一个像样的 CMS,让您可以更直接地控制演示文稿。根据我的经验,采用像 Joomla 这样的 CMS 并尝试将其转变为复杂的替代创建可能是程序员可能经历的最烦人的事情之一。
Short answer is "very probably". There's a good chance that modxcms handles all routing, controller actions, etc. on its own. There probably is no simple way to plug either one of these into the other.
Long answer is "it depends" followed by these conditions: what framework does modxcms use? How does it handle calls through its index.php file? What's the overhead of modxcms? If you want to manage routing in CodeIgniter, how will modx interfere? How would it be possible to have these two systems work together absent a some major refactoring of code?
Typically, it makes the most sense to stick to CMSs that are built on a platform that you like. For CodeIgniter, the only one I know of is ExpressionEngine, which is nice and all, but it costs. Other CMSs that I've experienced like Joomla or Drupal are a disaster if you're coming from something as clean as CodeIgniter.
So...not sure if this really helps you much, but I'd operate under the assumption that you can't (or at least shouldn't) mix CI with modx. IMO, it's easy enough to make a decent CMS using CI alone, giving you much more immediate control over the presentation. In my experience, taking a CMS like Joomla and trying to turn it into a complex alternate creation is probably one of the most annoying things a programmer can put himself through.