开发者

How to use drupal as a back-end but my own code as a front-end?

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 开发者_C百科job?

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.


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:

  • 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.
  • 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


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


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

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.


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.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜