View Issue Details

IDProjectCategoryView StatusLast Update
0000054Composrcore_themeingpublic2015-02-22 12:20
ReporterChris GrahamAssigned ToChris Graham 
SeverityFeature-request 
Status closedResolutionwon't fix 
Product Version 
Fixed in Version 
Summary0000054: New Tempcode look / Merge Tempcode and Comcode
DescriptionIn order to make Tempcode more intuitive to people, change how the syntax works.
Additional Information{IF HAS_CONTENTS "{CHILDREN}"}
   <div class="cedi_page_children">
      {CHILDREN}
   </div>
{/IF}

{IF HAS_NO_CONTENTS "{CHILDREN}"}
   {$LANG,NO_CONTENT}
{/IF}

{IF (HAS_NO_CONTENTS "{CHILDREN_A}") AND (HAS_NO_CONTENTS "{CHILDREN_B}")}
   {$LANG,NO_CONTENT}
{/IF}

{IF "{A}" AND "{B}"}
{/IF}

{IF "{A}"="3" AND "{B}"="2"}
{/IF}

Syntax recognised by...
{DIRECTIVE ...}
{/DIRECTIVE}
Anything inside the directive and not quoted is considered a symbol
Certain symbols are marked as infix
Brackets support; sensible parsing, if an infix symbol is found it realises that it has to fork

Synonyms for infix symbols:
= and == and EQ
&& and AND
|| and OR
TagsRisk: Breaks themes, Risk: General incompatibility, Risk: Major rearchitecting
Time estimation (hours)20
Sponsorship open

Activities

Chris Graham

2011-05-06 00:54

administrator   ~0000140

Last edited: 2015-01-11 14:51

View 5 revisions

Or merge Tempcode and Comcode, with the only difference being whether white-space is preserved or not (we currently informally call this "textcode"). So what are now Tempcode directives will just become new Comcode tags. Tempcode symbols can keep looking the same, but be called Comcode symbols. HTML would work natively in Comcode, as it would be like semihtml parsing mode is always on.
We could have an auto-decoded document-type that is 'normal' for a template and 'textcode' for where we now have Comcode. And invent 'textcode' and 'normal' tags to switch. Drop the existing 'semihtml' and 'html' tags.
So it is a combined HTML+Comcode+Tempcode language.

The term Tempcode would then be preserved only for the name of compiled Comcode.

Now that templates and Comcode pages are almost the same thing, we can add a 'Edit screen template' link on every page that is not a Comcode page, to add uniformality. We can merge the Comcode and template editors. We could even allow the template editing to be WYSIWYG on any individual template that is itself a valid XHTML snippet.

This simplifies the structure a lot. Now there is just one language, and any screen can be edited.

Chris Graham

2015-02-22 12:20

administrator   ~0002579

Closing, as the new inline WYSIWYG editing approaches this in a different way, makes it more visual. There's something nice about Comcode being like BBCode, and Tempcode being very grammatically simple so just slots in without distracting too much.

Issue History

Date Modified Username Field Change
2016-06-08 00:14 Chris Graham Tag Renamed Major rearchitecting => Risk: Major rearchitecting
2016-06-08 00:15 Chris Graham Tag Renamed General incompatibility => Risk: General incompatibility
2016-06-08 00:15 Chris Graham Tag Renamed Breaks themes => Risk: Breaks themes