Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By EmilioLuiz on
How do I insert a views in a static html or php website?
And this html be updated according to the update of drupal
Would you like a directing because I am the days looking for a viable solution and not against.
Sorry for my English, I am using the translator.
Comments
_
So, you have an existing Dupal site with a View and you would like to insert that view into a non-Drupal website?
Views is a part of Drupal. So you can't use Views on a non-Drupal site. But you can create an RSS feed Views display or XML using Views Data Export. Then you can parse that data on your other website with PHP or Javascript.
You would lose sorting and filtering functionality from the view, but you would have the data.
- Brendan
RE: -
Exactly the case.
I tried to use the export data views, but which does not fit in my requirement was having to update manually, or it is possible to automatically update?
Not simple, but documented.
https://www.drupal.org/node/1356116
-
Thank you, I believe this resolves
Solution
I first created a views field (module Feeds) as feed after I took the xml link and put it in a variable using the simplexml_load_file.
as the fields that should be inserted into html, was simple to find.
Thank you all for the help.