如何使用drupal作为后端但我自己的代码作为前端?

时间:2022-12-22 06:47:46

I don't want to use it to construct the whole site,

我不想用它来构建整个网站,

instead I want to use it just to manage part of the posts on the site.

相反,我想用它来管理网站上的部分帖子。

Is drupal fit for this kind of job?

drupal适合这种工作吗?

EDIT

If the answer is yes,can you provide some guidance here?

如果答案是肯定的,你能在这里提供一些指导吗?

I just want to use it to edit/manage the posts,but show it with my own code.

我只想用它来编辑/管理帖子,但用我自己的代码显示它。

5 个解决方案

#1


3  

If you want to use drupal as a 'pure backend' and pull in / display the content in some other internet site then you could look at either:

如果您想将drupal用作“纯后端”并在其他某个互联网站点中提取/显示内容,那么您可以查看:

  • Using drupal's mostly-generated-out-of-the-box RSS. Perhaps setting up a series of Views in drupal to collect posts together as you required them. Pretty easy to set up but doesn't give you a whole lot of control.
  • 使用drupal主要生成的开箱即用的RSS。也许在drupal中设置一系列视图,以便在需要时一起收集帖子。很容易设置,但不会给你很多控制。

  • Looking into the Services module and the various web-services that you can set up with it. I have used this a number of times when I needed to have a Flash frontend to a drupal site, which (conceptually at least) sounds kind of like what you are describing - Services module on drupal.org
  • 查看服务模块以及可以使用它设置的各种Web服务。当我需要在drupal站点上安装Flash前端时,我已经多次使用过这个版本(概念上至少)听起来有点像你所描述的那样 - drupal.org上的服务模块

#2


0  

Short answer: Yes, Drupal can do that, though it was not designed for this purpose.

简短回答:是的,Drupal可以做到这一点,虽然它不是为此而设计的。

#3


0  

Here's how you can do it; you can configure drupal as a blogging platform.

这是你如何做到的;您可以将drupal配置为博客平台。

OK, now you have clarified your question. In order to show the data, maybe you can write your own modules that display whatever result your want. That's one way.

好的,现在你澄清了你的问题。为了显示数据,您可以编写自己的模块来显示您想要的结果。这是一种方式。

Another way, a very ugly is, in your node page, set your node to accept full PHP, and then start writing PHP MySQL code. Like I told you, this is a very ugly way.

另一种方式,非常难看的是,在您的节点页面中,将您的节点设置为接受完整的PHP,然后开始编写PHP MySQL代码。就像我告诉过你的那样,这是一种非常丑陋的方式。

#4


0  

You may find that you want to write your own Drupal theme. This would make the front end code your own but keep most of the site working as Drupal does normally. This gives you most flexibility for least work.

您可能会发现您想编写自己的Drupal主题。这将使前端代码成为您自己的代码,但保持大部分网站正常工作,因为Drupal正常运行。这为您提供了最少的工作灵活性。

#5


0  

theming would be the best way. however, drupal stores all its data in a very tidy and structured way, so you can probably do the sql calls you need from your cms, or whatever it is you're coding to show everything else in your site. i suggest reading http://drupal.org/node/22754 for especific table descriptions. you'll probably use cck, so i suggest studying its tables just as well. (you can try drupal 7, since it has fields in core, and seems to be even tidier).

主题将是最好的方式。但是,drupal以非常整洁和结构化的方式存储它的所有数据,所以你可以从你的cms做你需要的sql调用,或者你正在编码的任何东西,以显示你站点中的其他所有内容。我建议阅读http://drupal.org/node/22754以获取特定的表格描述。你可能会使用cck,所以我建议也要研究它的表。 (你可以尝试drupal 7,因为它有核心字段,而且看起来更整洁)。

#1


3  

If you want to use drupal as a 'pure backend' and pull in / display the content in some other internet site then you could look at either:

如果您想将drupal用作“纯后端”并在其他某个互联网站点中提取/显示内容,那么您可以查看:

  • Using drupal's mostly-generated-out-of-the-box RSS. Perhaps setting up a series of Views in drupal to collect posts together as you required them. Pretty easy to set up but doesn't give you a whole lot of control.
  • 使用drupal主要生成的开箱即用的RSS。也许在drupal中设置一系列视图,以便在需要时一起收集帖子。很容易设置,但不会给你很多控制。

  • Looking into the Services module and the various web-services that you can set up with it. I have used this a number of times when I needed to have a Flash frontend to a drupal site, which (conceptually at least) sounds kind of like what you are describing - Services module on drupal.org
  • 查看服务模块以及可以使用它设置的各种Web服务。当我需要在drupal站点上安装Flash前端时,我已经多次使用过这个版本(概念上至少)听起来有点像你所描述的那样 - drupal.org上的服务模块

#2


0  

Short answer: Yes, Drupal can do that, though it was not designed for this purpose.

简短回答:是的,Drupal可以做到这一点,虽然它不是为此而设计的。

#3


0  

Here's how you can do it; you can configure drupal as a blogging platform.

这是你如何做到的;您可以将drupal配置为博客平台。

OK, now you have clarified your question. In order to show the data, maybe you can write your own modules that display whatever result your want. That's one way.

好的,现在你澄清了你的问题。为了显示数据,您可以编写自己的模块来显示您想要的结果。这是一种方式。

Another way, a very ugly is, in your node page, set your node to accept full PHP, and then start writing PHP MySQL code. Like I told you, this is a very ugly way.

另一种方式,非常难看的是,在您的节点页面中,将您的节点设置为接受完整的PHP,然后开始编写PHP MySQL代码。就像我告诉过你的那样,这是一种非常丑陋的方式。

#4


0  

You may find that you want to write your own Drupal theme. This would make the front end code your own but keep most of the site working as Drupal does normally. This gives you most flexibility for least work.

您可能会发现您想编写自己的Drupal主题。这将使前端代码成为您自己的代码,但保持大部分网站正常工作,因为Drupal正常运行。这为您提供了最少的工作灵活性。

#5


0  

theming would be the best way. however, drupal stores all its data in a very tidy and structured way, so you can probably do the sql calls you need from your cms, or whatever it is you're coding to show everything else in your site. i suggest reading http://drupal.org/node/22754 for especific table descriptions. you'll probably use cck, so i suggest studying its tables just as well. (you can try drupal 7, since it has fields in core, and seems to be even tidier).

主题将是最好的方式。但是,drupal以非常整洁和结构化的方式存储它的所有数据,所以你可以从你的cms做你需要的sql调用,或者你正在编码的任何东西,以显示你站点中的其他所有内容。我建议阅读http://drupal.org/node/22754以获取特定的表格描述。你可能会使用cck,所以我建议也要研究它的表。 (你可以尝试drupal 7,因为它有核心字段,而且看起来更整洁)。