Showing posts with label WORKSPACE_IMAGES. Show all posts
Showing posts with label WORKSPACE_IMAGES. Show all posts

12 May 2012

Referencing substitution strings

Recently some people asked me why I use #IMAGE_PREFIX# substitution string instead of /i/ in my application when I refer to server located files. The reason is quite simple – it’s not always /i/. You can configure your server files path in Home>Application Builder>Application>Shared Components>Edit Application Definition by editing "Image prefix" option.

So it's better idea to use universal:
<script type="text/javascript" src="#IMAGE_PREFIX#jQuery/js/jquery-1.4.2.min.js"></script>

than hardcoded:
<script type="text/javascript" src="/i/jQuery/js/jquery-1.4.2.min.js"></script>

Remember also about difference between three referencing substitution strings:

  • #IMAGE_PREFIX# points to virtual path of server "images" directory (default /i/);
  • #APP_IMAGES# points to static files uploaded with APEX upload utility (so saved in database), that are related to specific application (and only this application can use them);
  • #WORKSPACE_IMAGES# points to static files uploaded with APEX upload utility (so saved in database), that are related to the workspace (any application can use them).

Labels

APEX (10) jQuery (3) jQuery UI (3) info (2) polski (2) APP_IMAGES (1) CSS (1) IMAGE_PREFIX (1) Oracle XE (1) Polska (1) WORKSPACE_IMAGES (1) accordion menu (1) book (1) informacje (1) intro (1) javascript (1) pl/sql (1) translation (1) tłumaczenie (1)