Is there a way to see the html code of the whole page?

I have a long lading page consisting of many chunks. How can I see and copy the whole page html code? I need the code that hasn’t been processed by browser, so CTRL+U won’t fit as a solution.

If you look at the template the page uses and the content of the page itself, that should give you most of what you want.

If that doesn’t do it, it might be possible to capture the state of the resource in a plugin and write it to the error log. OnParseDocument, OnWebPageInit, or OnLoadWebDocument might be the proper point to grab that, but I’m not sure what state the resource is in at those points.

1 Like

Are you just looking for the “raw” html returned to the browser prior to the browser parsing? If that is the case, you can simply go to the “Network” tab of your browsers inspector.

As an example (using Google chrome), when I load Modx.com, I can click on the entry in the name column list of resources and see the request and response headers and all the details about the particular request.

You can open the inspector through the menu or by right-clicking and selecting “Inspect”. Then click on the “Network” tab.

Inspector Network panel:

Then, by clicking on response, I can see the full raw HTML:

If you put html comments surrounding your chunks, snippets, etc, you’d be able to see where they output as well. Although you may want to remove the comments in your final version.

Is that what you’re looking for?

Thanks,
Jared

1 Like

Thank you for your reply. This method I already know, but it’s not exactly what I need. But I’му just combined chunks manually.

You’re welcome. If you do want more assistance, we likely just need more details around what you’re trying to accomplish… examples:

  • “I have a slow loading page, how can I identify how much time is taken processing each chunk, and/or snippet to speed up the page load?”
  • “How can I identify all the chunk/snippet dependencies that a resource has?”

Not that I know the answers to those questions, but they might get you closer to what you’re looking for :slight_smile:

Welcome to the MODX Community @waitfornight6. Did you find a solution to your problem? If so, could you let folks know what solved your problem and what the problem you were trying to solve (at a higher level of thinking. I.e., why you needed this specific output).