TextCMS Documentation - Internal Plugins - SCRIPT

Plugin Description

You may want to inject an additional JS file into one of your articles, modules, areas or templates. Of course you can do this manually using <script src=...> tag. But you'd need to supply the full path to your JS file. TextCMS provides you with plugin SCRIPT to simplify the task. The syntax is [SCRIPT](js_file_name).js[/SCRIPT]. TextCMS will search for the script in the following locations:

File Search Locations

Some of the TextCMS plugins search for media files (images, video, audio, css etc...). They usially search in the following order:

  1. If a plugin is used in an article, it will search in the same location as the article file
  2. If a plugin is used in an article, it will also search in the _(article_name) subfolder. For example, if your article is named "test" (article file is "_articles/test.art"), it will search in folder "_articles/_test"
  3. If a plugin is used in a module, it will search in the same location as the module file
  4. If a plugin is used in a module, it will also search in the _(module_name) subfolder. For example, if your module is named "test" (module file is "_modules/test.mod"), it will search in folder "_modules/_test"
  5. If a plugin is used in an area, it will search in the same location as the area file
  6. If a plugin is used in an area, it will also search in the _(area_name) subfolder. For example, if your area is named "top" (area file is "_area/top.mod"), it will search in folder "_areas/_top"
  7. If a plugin is used in a template, it will search in the same location as the template file
  8. if a plugin is used in a template, it will also search in the _(template_name) subfolder. For example, if your template is named "test" (template file is "_templates/test.tpl"), it will search in folder "_templates/_test"
  9. it will also search in "_media" folder of your web site

Plugin Usage

This plugin can be used everywhere

Articles
Templates
Modules
Areas

Attributes

This plugin does not support attributes.

Styling

This plugin does not support plugin-specific styling.

Example

[SCRIPT]myscript.js[/SCRIPT]
(c) 2018-2024 TextCMS