Jump to content

Markup Regions - conditional replacement of regions


Gadgetto
 Share

Recommended Posts

Hi,

I'm just experimenting with Markup Regions and have a question regarding conditional replacement of a region.

Is this the right way to do the following:

<?php
if (!modules()->isInstalled('ModuleRequiredForRendering')) {
    ?>
    <div id="content">
        <strong>ModuleRequiredForRendering</strong> module is not installed. Module is required to render this page!
    </div>
    <?php
    return;
}
?>
<div id="content">
	// output content ...
</div>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...