No indentation in HTML blocks of .phtml files

Hi,

I wonder if it is possible not to indent the HTML blocks within a .phtml file. But keep this in longer PHP blocks.

An example:

<?php
$this->headMeta()->appendName(
    'viewport', 'width=device-width, initial-scale=1'
);
$this->headLink(
    array(
        'rel' => 'shortcut icon',
        'href' => '/assets/custom/img/favicon.ico'
    
)
);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<?php echo $this->headTitle() . "\n"; ?>
<?php echo $this
->headMeta() . "\n"; ?>
<?php echo $this
->headLink() . "\n"; ?>
<?php echo $this
->headScript() . "\n"; ?>
<?php echo $this
->headStyle() . "\n"; ?>
</head>
<body>
</body>
</html>


Is that possible? I can only decide to use the PHP code style or the HTML code style here.

Thanks and best regards.

Ralf

1 comment
Comment actions Permalink

Currently there is no way to have different indentation styles in single file - see https://youtrack.jetbrains.com/issue/WI-17786#comment=27-811782

0

Please sign in to leave a comment.