Child pages
  • Frontend Debugging
Skip to end of metadata
Go to start of metadata

CONTENIDO provides some helpful settings to quickly find bugs in frontend modules. You can activate those features in the config.php of your client.

Options

This is the relevant section of the config.php:

// Various debugging options
$frontend_debug['general_information'] = false;
$frontend_debug['container_display'] = false;
$frontend_debug['module_display'] = false;
$frontend_debug['module_timing'] = false;
$frontend_debug['template_display'] = false;


// Set to 1 to brute-force module regeneration
$force = 0;

These settings will only output HTML comments in your website. Activating them is generally without any consequences for visitors, however it can happen that these will output comments in places where they don't belong (for example inside the title tag).

All of these settings are boolean.

General Information

If the "general_information" flag is turned on, CONTENIDO will output some informations about the viewed webpage as HTML comments at the beginning of the page. They look similar to this:

<!-- 

Layout: start_page (2)
Template: start_page (3)
Language: 1 (deutsch)
Category: 1 (Hauptnavigation)
Article: Start (catart = 84, artlang = 117, art = 77)

--> 

You get a quick look at the variables that CONTENIDO used to generate this page.

Container Display

The "container_display" flag enables the output of markers at the beginning and at the end of containers.

<!-- START CONTAINER navigation_top (212) -->
<ul>
	<li>
    	<a class="" href="front_content.php?idcat=40&lang=1" title="Kontakt">Kontakt</a>
    </li>
    <li>
    	<a class="" href="front_content.php?idcat=47&lang=1" title="Sitemap">Sitemap</a>
    </li>
    <li>
    	<a class="" href="front_content.php?idcat=41&lang=1" title="Login">Login</a>
    </li>
</ul>
<!-- END CONTAINER navigation_top (212) -->

Module Display

This flag enables markers at the beginning and at the end of module output:

<!-- START MODULE layout_logo (33) -->
<a href="http://localhost/contenido/cms/" title="CONTENIDO">
    <img src="images/misc/logo.png" width="279" height="41" alt="CONTENIDO" id="logo" />
</a>
<!-- END MODULE layout_logo (33) -->

Module Timing

This flag can only be enabled if "module_display" is enabled, too. If enabled, CONTENIDO will time how long one module takes to generate its output. This is extremely helpful to find modules that slow down the website:

<!-- START MODULE layout_logo (33) -->
<a href="http://localhost/contenido/cms/" title="CONTENIDO">
    <img src="images/misc/logo.png" width="279" height="41" alt="CONTENIDO" id="logo" />
</a>
<!-- END MODULE layout_logo (33) AFTER 0.0012640953063965 -->

CONTENDIO will output the time (in seconds) the module needed in the END MODULE comment.

Template Display

If this flag is turned on, CONTENIDO will output an HTML comment whenever a template is used. It does not matter if it's a Smarty template or a cTemplate. The output looks something like this:

For Smarty templates
<!-- SMARTY TEMPLATE get.tpl -->
For cTemplates
<!-- CTEMPLATE get.html --> 

The name in the comments is the one the module used to find it. Together with the "module_display" tag you can easily figure out which part of the website came from which file on the server.

Force Code Generation

The last variable in the config.php is used to make CONTENIDO ignore its code cache. This is useful if you want to edit your modules outside of CONTENIDO and want to get immediate results without having to go into the backend and clear the cache yourself.

Keep in mind: this has no effect on the Smarty cache!
  • No labels