Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

How does Scripts & Styles work?

When

...

a

...

custom script or style sheet

...

is created, it is automatically added to the correct system folder

...

and available for selection in a template. To reduce load times

...

, each file is minified once saved.


You can:

  • sort all scripts or styles by file name and date last edited.
  • view which pages/templates a file is in use.
  • view historical versions of a file, and its audit trail of the date

...

  • /time

...

  • saved and the user

...

  • .
  • use the comparison tool to check between two versions of a script or style.
  • roll back to a previous version if the current version is not behaving as expected

...

  • .


When you enter the Scripts or Styles screen, all files are listed. At a glance, you can see the number of times a file is in use and its last edited details. Files can be sorted by file name and date last edited.   

Image Added 


Once a script or style has been saved,

...

it is available for adding to a page or template. See: Scripts & Styles Widget.

Image Modified

...


Panel

On this page:

Table of Contents


Create a script or style

...

To best explain the functionality, we will make a simple change to the background colour of our Store Locator page.

  1. In your CMS,

...

  1. go to Advanced Content → Scripts & Styles.
    Image Modified

  2. Select Style Sheets. All existing style sheets are displayed.
    Image Modified
  3. Click Add Script/Style

...

  1. on the top right corner.

  2. In Add Script/Style, select Style Sheet.
    Image Modified

  3. In File Name, enter an appropriate name that follows the naming conventions of our site.

  4. Click

...

  1. Add

...

...



  1. In the blank editing window

...

  1. , start typing in your custom style sheet.

...

  1. (For a guide to using the Editor, see Code Editor.) Or you can paste text

...

  1. into the Editor.

    Image Modified

...


  1. Click Save.

  2. Click Cancel to exit

...

  1. .

Apply a script or style to a page/template

Now we will apply that style sheet to our Store Locator page (or the Page that you have chosen).


  1.  In your CMS,

...

  1. go to Content → Pages & Templates

...


  1. Use the Search tool to find 'Store Locator'. NOTE - Your page name may be different.
    Image Modified

  2. Click Edit

...

  1. next to the page/template name.

...


  1. In the

...

  1. template, click Add Widget.
    Image Modified

  2. In the search field, start typing 'Scripts & Styles' — the system will auto-fill the results.
    Image Modified

  3. Select 'Scripts & Styles' and click Add Widget Image Modified.  

  4. The Scripts & Styles Widget automatically opens. In Description, enter a meaningful description for

...

  1. this use

...

  1. . This will display next to the style name when

...

  1. in use.

  2. Add a Layer if

...

  1. needed.  (See

...

  1. : Layers.)

...


  1. In Scripts & Styles

...

  1. , select the style you created

...

  1. , then click Add.

    Image Modified

  2. Click Edit

...

  1. to make some last minute changes to the Style Sheet, otherwise, to apply the script or style, toggle ON Enable widget on Save, then click Save

...

  1. .

...




  1. Image Modified

  2. If the Page Preview setting is on, click Publish (top right of the screen).

  3. Go to your site and open the Store Locator page (or the page to which you made changes).
    Image Modified


Compare or revert to an earlier version of a script or style

...

The file history of each script and style

...

lists all versions with

...

saved dates/times and users. You can

...

compare versions. If you

...

're not happy with the current version,

...

revert to an earlier one.

  1. In the CMS,

...

  1. go to Advanced Content → Scripts & Styles.

  2. Click on either the Javascript or Style Sheets tab.
    Image Modified

  3. Click the Edit button

...

  1. next to the script or style.
    Image Modified

  2. In the 'Edit' page, hover on Options

...

  1. , then click File History.
    Image Modified

...


  1. The current and previous versions are listed. To view

...

  1. a previous version, click on it.
    Image Modified

  2. To compare two versions, in the Compare? column, toggle ON the two versions, then click Compare Version
    Image Modified

...


  1. Changes are highlighted. When you've finished viewing, click Clear Compare.
    Image Modified

  2. To use

...

  1. a previous version, click on

...

  1. it, then click the Restore this version button.
    Image Modified

  2. To confirm, click Save. The

...

  1. previous version

...

  1. is copied

...

  1. and saved as the latest version.
    Image Modified


Delete a script or style


Info

Deleting non-system scripts and styles in the CMS is available from 4.17+. NOTE - Scripts and styles currently used on a page or template cannot be deleted. They have to be removed from templates first.


  1. In the CMS,

...

  1. go to Advanced Content → Scripts & Styles.

  2. Click on the Javascript or Style Sheets tab.

  3. User-created files will have both 'Edit' and 'Option' buttons. To delete the file, hover over

...

  1. Options

...

  1. , then click Delete. NOTE - System files

...

  1. cannot be deleted
    Image Modified

  2. In the delete confirmation popup, click OK.


Check where a script or style is

...

in use

  1. In the CMS,

...

  1. go to Advanced Content → Scripts & Styles.

  2. Click on the Javascript or Style Sheets tab.

  3. Find the file name, hover over its Options button,

...

  1. then click Where It's Used.
    Image Modified

  2. The templates currently

...

  1. using the script or style

...

  1. are shown.
    Image Modified

Minify Scripts and Styles


To improve the load time of web pages on your website, existing files can be minified.


  1. Go to Advanced Content → Scripts & Styles.
    Image Added
  2. Hover over Options, then click Minify All Files.
    Image Added
  3. In the popup, confirm you want the files minified.


 


Additional Information


Minimum Version Requirements


Multiexcerpt
MultiExcerptNameMinimum Version Requirements

4.13.02


Prerequisites


Multiexcerpt
MultiExcerptNamePre reqs

Upgrade to version 4.13.02


Self Configurable


Multiexcerpt
MultiExcerptNameSelf Configurable

Yes


Business Function


Multiexcerpt
MultiExcerptNameBusiness Function

...

Multiexcerpt
MultiExcerptNameBallpark Hours From CV (if opting for CV to complete self config component)

Contact Commerce Vision

...

Multiexcerpt
MultiExcerptNameBallpark Hours From CV (in addition to any self config required)

Contact Commerce Vision

Content


BPD Only?


Multiexcerpt
MultiExcerptNameBPD Only

Yes


B2B/B2C/Both


Multiexcerpt
MultiExcerptNameB2B/B2C/Both

Both

...


Third Party Costs


Multiexcerpt
MultiExcerptNameThird Party Costs

N/A

...

MultiExcerptNameCMS Category

...





Multiexcerpt
hiddentrue
MultiExcerptNameFeatures List Headers

Macro Instructions for carrying Article Information through to Feature List

Minimum

Version

Requirements

BPD

ONLY


Business Function

CMS Category

B2B
B2C

BOTH

Feature

Feature Description

(Written for our customers and can be pasted into comms sent to them)

Additional info

Pre-Reqs/
Gotchas

Self Configurable

Ballpark Hours
From CV

(if opting for CV to complete self config component)

Ballpark Hours
From CV

(in addition to any self config required)

Third Party Costs

Instructions for carrying Excerpts through from this page to the Feature List

Article Page:

Add macro  / Multiexcerpt (or copy and existing excerpt and edit) or (Copy existing page and place content into existing excerpt macros)

On Features List page:

Click in the Cell to be populated  / add macro /  Multiexcerpt Include / Select the Article page and the excerpt (or copy another feature line and edit the 'Article page' source.



Related help

Content by Label
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
excludeCurrenttrue
cqllabel = "scripts-styles" and type = "page" and space = "KB"
labelsnew ver41302 how-to