I want to loop through all resources and get the final HTML page code for each resource.
Is there any modx function that provides such a functionality.
Or any ideas how the final static html code can be gathered.
Thanks
I think that there is something like get export resources in evolution version as far as what I read on forum.
What I want to do is the same thing actually. To be able to get the static state of resources. Anyone at least has any idea, if this is doable through the modx environment.
My needs are not quite the same I’m sure but I have a current need to use MODx to serve up XML to manage a migration I am doing to MODx. In effect what I am doing is turning static XML into a dynamically managed configuration through MODx, using MODx as a means of not having to manually manage the XML. So on every save of a TV that belongs to a template that belong to the XML system I trap and flag that a change was made. Then every 5 min I have a cron job t hat sees if flag is set for a change then through curl calls the URL and saves response to file. From there I am back to a static XML file that my other system then parses.
In your case you could trap the event when a resource is save and the loop back around with a curl call that saves it to disk.
Of course this all only works if your "dynamic" resource is just a static resource that is being assembled dynamically. If you have any variants to your pages t hen you can only really capture the default variant.
I am not in front of it right now but if you are interested in this and can’t figure out the system events to trap let me know and I can share more.
"One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow

"
You may or may not want to use the code I write. It's probably all against the syntax rules of php and MODx.
Carpet Cleaning
Thanks heavensbest. That was what I was looking.