CMSEncore

Tips N Tricks

Bits N Pieces


Small one liners (little bits-n-pieces) you'll find on this page other more involved items you'll find as their own articles.

RTFM - Read The Fine Manual

Not much of a Trick but certainly an excellent Tip - you're not getting better advise than this from anyone ... ever! Short of asking every question you need answered to get your project built you'll have to read the manual at some point - do it first. Believe me, you won't be very popular towards the end if this is the route you choose. Nobody will answer your question - if it looks like you've skipped this very important step.

Watch Your Quotes

When you're working on projects involving eScript you have to be careful about your quote characters. Single or Double quotes mean different things in different parts of your script. For example the string 'Article' passed to a function QueryContentListIncl('Article', ...) uses single quotes whereas in <FOREACH ds="Article"> the ds is always double quoted. It gets me every time.
A good rule of thumb is: If your inside <$ and $> use single quotes otherwise it's double.

Kill The Engine

In the default templates that are created with a new site any script/macros that are found in the content will be run - expand into what the script/macro is designed to represent. This is accomplished with the underscore characters at either end of the Content macro - {%!_Content_Text_%}. If you need to write macros and/or eScript into your content to explain them, as you'll see a lot of here, this functionality has to be disabled. Removing the underscores and using {%!Content_Text%} instead will do exactly this.
There is at least one exception to this, that I've found. I'm not sure why but with a GRN you need to remove the double quotes that get copied to the clipboard as in: ECMS_LINK_M01 if you don't, you get the file name that the GRN represents: "" same bit of text, one quoted - one not ... odd eh?

IE Controls The Font

Most of the windows you'll find for viewing and editing content get their font size from your IE "Text Size" settings found under the "View" menu in IE.

eScript & Macro - Code Preview

Want to have a peak behind the scenes?

BBarbier wrote:
... one way to test what static text or eScript code some macros expand to (even things like FOREACH, ANCHOR and SQL tags), you can turn off the 'Expand Templates' checkbox on Edit Template dialog, and then on Preview tab when viewing HTML Output you will be able to see the exact code Encore generates - this will give you a nice behind the scenes look.

Cool eh? Works on any Preview window.


| By: PNII | Category: CMSEncore [Tips N Tricks] | Last Modified: Dec 30, 1899 |