Can someone please explain the process behind tp=1 for the mod positions preview , I found the module output which is called from templates/system/html/module.php function modChrome_outline(...)

and I know that the style is being forced if site is accessed via tp=1 var https://github.com/joomla/joomla-cms/blob/7d55d68cfbfe2b86589f2df9aab1771afce4fab0/libraries/cms/module/helper.php#L229

what I assume is happening is that when accessed via tp=1 the site is forced to use system template but I am looking for actual process and cant find it.

If here https://github.com/joomla/joomla-cms/blob/7d55d68cfbfe2b86589f2df9aab1771afce4fab0/libraries/cms/module/helper.php#L231

I change

$attribs['style'] .= ' outline';


$attribs['style'] .= ' customoutline';

and have my customoutline chrome in modules.php I still get only the mods published on that page , not all module positions.

So can anyone please explain or show me where( what file ) the process is located.

Thank you!

1 Answer 1


Found it , was missing one more override which was bellow


So to sum down ,

if u wish to make own mods preview

create your preview chrome in templates/your_template/html/modules.php

override module helper class (see this ) by adding

    // my preview
    if ($app->input->getBool('myoutline'))
        $attribs['style'] .= ' myoutline';



and extend this if statement https://github.com/joomla/joomla-cms/blob/7d55d68cfbfe2b86589f2df9aab1771afce4fab0/libraries/cms/module/helper.php#L98


 || $input->getBool('myoutline')

now you can control the modules positions preview from your template/html/module.php and make it look better than what we have in j default since 1.0

access the preview via


I will extend this one bit more and show you why I did this.

In order for us to show users all available module positions for our template framework

we must publish over 50 module positions which are just plain HTML. In my eyes this is an overload.

With the override in place , I can now remove all those 50+ modules and control the preview

and the content via the chrome function


so I still have same preview like on our old demos

with much less modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.