How to split a template in DLE?

How to split a template in DLE so that when you enter other sections, another tplis loaded?

I found a solution for the gallery:

if( $do == 'photo' ) $tpl->load_template ( 'main_photo.tpl' );
else $tpl->load_template ( 'main.tpl' );

I can’t find it for static pages, the previous trick doesn’t help.

if( $do == 'opisanie.html' ) $tpl->load_template ( 'main_photo.tpl' );
else $tpl->load_template ( 'main.tpl' );

Answer 1, authority 100%

in the admin panel for static pages, you can specify your own tpl created. if nothing is specified, then by default it simply takes static.tpl, you can of course change it.

And if it depends on the page, then you can dig into engine\modules\static.php and add a condition to the code

       if( $view_template == "print" ) $tpl->load_template( 'static_print.tpl' );
        elseif( $static_result['tpl'] != '' ) $tpl->load_template( $static_result['tpl'] . '.tpl' );
        else $tpl->load_template( 'static.tpl' );

I think everything is clear here