[solved]Syntax Highlighter, CodeEditor, TemplateExternalizer

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
reinhardmohr
Forum Members
Forum Members
Posts: 112
Joined: Sun Aug 06, 2006 2:36 pm

[solved]Syntax Highlighter, CodeEditor, TemplateExternalizer

Post by reinhardmohr »

Hi,
after having worked on two installations of CMSms 2.0 I have worked my way into it and I have found some advantages and benefits in it. Thanks to the developers for investing so much time and energy in it!
But I still have a hard time when it comes to editing stylesheets or templates in CMSms 2.0. In the 1.x series I was used to AceEditor (or a syntax highlighter like CodeMirror) to do some work in the backend. Or I started TemplateExternalizer and then had all the benefits of my own code editor (I use Coda and Espresso) to work with stylesheets, templates, UDTs and Global Content Blocks.
Both ways of working are blocked now – that makes setting up a website very complicated. So I was searching the forum and reading the documentation. But I couldn't find a hint on how to improve the situation.
The only workflow that seems open to me is to copy all the content of a template or stylesheet, open a new file in my editor, paste in the text, do the changes and paste it back. Then I have to save the template (or stylesheet) and have to reload one of the associated pages in my browser to see if everything works.
This is a very awkward workflow.
So I finally write this post to hear about other experiences. Or to learn how I can improve my workflow. Or just to find out if a have overlooked a module or an update.
Maybe things in the 1.x series just were really simple. And now we are all spoiled a bit and complain too easily. Probably it just takes a while with the 2.x series until everything is going smoothly again.
Thanks to the developers for their hard work and thanks for everybody who could give me a hint or a bit of information!
Reinhard
Last edited by reinhardmohr on Mon Nov 16, 2015 9:27 am, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Syntax Highlighter, CodeEditor, TemplateExternalizer for

Post by calguy1000 »

We announced long ago (perhaps even before the beta process began) that syntax highlighter and WYSIWYG modules would be broken in 2.0 and as well TemplateExternalizer.

Though nothing has come out yet.. I know that there are plans to release new WYSIWYG modules and syntax hilighter modules for CMSMS 2.x. Though those module developers are very busy at the moment.

Additionally, for modules CMSMS 2.0 allows you to work with file based templates directly, without the need for a module like TemplateExternalizer. (for modules using the CMSMS 2.0 API)

i.e: {Navigator template='simple_nav.tpl'} will automatically look for a file named simple_nav.tpl in:
<root>/module_custom/Navigator/templates/simple_nav.tpl
and
<root>/modules/Navigator/templates/simple_nav.tpl

You also have the option of using the smarty include tag.
i.e: {include file='something.tpl'} which will look in <root>/tmp/templates for a file named something.tpl

There are plans to allow page templates to be read from files in a similar way (probably CMSMS 2.2 or so).

So, to summarize: CMSMS 2.0 increases the developers flexibility with respect to templates. However, third party module authors have not caught up yet. Which is unfortunate.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
reinhardmohr
Forum Members
Forum Members
Posts: 112
Joined: Sun Aug 06, 2006 2:36 pm

Re: Syntax Highlighter, CodeEditor, TemplateExternalizer for

Post by reinhardmohr »

Hi, calguy,

thanks for the quick response. I think your advice sounds really helpful and might make my workflow more practical and fluid.
I will try it and report if I succeeded – but it might take me a while until I have set it up properly.

Thanks for helping

Reinhard
reinhardmohr
Forum Members
Forum Members
Posts: 112
Joined: Sun Aug 06, 2006 2:36 pm

Re: Syntax Highlighter, CodeEditor, TemplateExternalizer for

Post by reinhardmohr »

Thanks a lot for helping, calguy,
I have just set up a file based Navigator template and it works! Now I have all the benefits again like syntax highlighting and line numbers.
This is great help and reduces my work time significantly.
I know that such things are often mentioned in the documentation and in read me files. But sometimes I need a hint to the right direction!

Thanks and good luck for developing

Reinhard
Post Reply

Return to “CMSMS Core”