[mythtv-theming] template tag syntax

Robert McNamara robert.mcnamara at gmail.com
Thu Sep 1 03:54:24 UTC 2011


On Wed, Aug 31, 2011 at 8:35 PM, Joey Morris <rjmorris at nc.rr.com> wrote:
>  <template>%TITLE%%: |SUBTITLE|%</template>

Your mistake is the extra unnecessary pipe, the last one.

| means "everything between this pipe and the percentage sign, but
only if this thing exists."  It can work in either direction.  So, to
do what you want (where the colon and space only appears if the
subtitle exists):

%TITLE%%: |SUBTITLE%

Or how about this, as an example in the opposite direction:

%DIRECTOR| was the director.%

So, in summary

%Some Stuff|

or

|Some other Stuff%

But never

%|

or

|%

Make sense?

Robert


More information about the mythtv-theming mailing list