Composer HELP - Javascript


Can anyone help me if there is way to disable Javascript while writing in Composer.
Or Something like the if in edit mode but for Composer:
global $c;
if ($c->isEditMode()) { 
  //Do something

View Replies:
mesuva replied on at Permalink Reply
I don't think this is going to be possible. Too much of the editing interface is dependant on javascript to be able to disable it when using the composer.

Why are you needing to do this?
fjhadd replied on at Permalink Reply
I really need is to disable the javascript of a block. Not all the javascripts.
The javascript is coflicting somehow with the composer.
ScottC replied on at Permalink Reply
if this is a view issue I would recommend creating a file named scrapbook.php that renders something slightly different if you are in the scrapbook, ...or at least that is where I would start

If that doesn't work, then you would want to leverage the dashboard helper which you would ask if you are in the dashboard(and thus the rendering doesn't really matter) and you just need to show some sort of placeholder there and create a big if statement in your view.
fjhadd replied on at Permalink Reply
Why scrapbook is not rendering well in Composer.
andywharfe replied on at Permalink Reply
If your issue is with the 7sec auto save while using composer - write. I would suggest that you disable autosave as follows:

1. Create a new directory structure under single_pages at your webroot:


2. Copy the file write.php - found in concrete/single_pages/dashboard/composer - to the composer directory just created.

3. Edit your copy of write.php and search for:

ccm_composerDoAutoSaveAllowed = true

and replace true with false. Save edited file and everything should work without auto save running every 7sec.

Tried and tested in my test environment.

We really need a way from the dashboard to configure the auto save for composer instead of defaulting to

currently set to 7000ms.
foiseworth replied on at Permalink Reply
fjhadd - the below worked for me on 5.5. Hope it helps!

<?php if (!$c->isEditMode() && !strpos($c->cFilename, 'dashboard/composer')): ?>
   <!-- Conditional code goes here -->
<?php endif; ?>