template construction & template variables Topic is solved

General project discussion. NOT for help questions.
Post Reply
Chris..S

template construction & template variables

Post by Chris..S »

Hi,

I am new to CMS Made Simple and I am just grappling my way through a first installation.  So please don't take this the wrong way, if I have missed something obvious.

I am not a fan of CSS and template files being stored (hidden) in the DB.  I believe its much quicker and simpler to develop and edit a template as a file outside of the DB.  But so saying, I can see where there would be advantages, primarily in providing edit assistance tightly linked to the capabilities of CMSMS - but I don't see those advantages in CMS Made Simple at least not in templates.  I haven't got to the CSS yet.

It would be nice(TM) if, for instance, CMSMS and any installed modules/plugins exposed their template variables so the template editor could provide a list of available variables for insertion.  It would be incredibly nice(R) if they also exposed a description/help snippet too.  e.g. Blog:CMS has a system somewhat like this.

Please don't get me wrong, I am impressed with many aspects of CMSMS.  I especially like the mechanism linking contents directly into the site menu making adding content and updating a menu across the site a single process.  It also installed very easily (except for a small glitch with double hashing of the admin password).

Is there anywhere a good list of template variables?
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

Re: template construction & template variables

Post by lemkepf »

calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: template construction & template variables

Post by calguy1000 »

I agree with you that something has to be done to better document the exposed smarty variables in templates.  It is difficult to know which variables are available, and what they do, particularly with modules.

To this end, I have been doing something that helps with this in my modules (Uploads, FrontEndUsers, SelfRegistration, ...).  In any template that is exposed to the front end, I store it in the database, and give it a default value.  The default template typically provides an example of how to use all of the variables I have exposed for use in that template.  T

The administrator can then use this example to customize the template.  Although this is not an ideal solution, it does help  I agree something needs to be done to better document these variables, etc.  we just haven't come up with anything yet for this.
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.
westis

Re: template construction & template variables

Post by westis »

Chris..S wrote: It would be nice(TM) if, for instance, CMSMS and any installed modules/plugins exposed their template variables so the template editor could provide a list of available variables for insertion.  It would be incredibly nice(R) if they also exposed a description/help snippet too.  e.g. Blog:CMS has a system somewhat like this.
I perfectly agree with this idea. There are ideas about this being discusseed. And most likely there will be something like this available for 1.0 in Q1 2006.
Please don't get me wrong, I am impressed with many aspects of CMSMS. 
Good ideas are always welcome, you don't have to excuse yourself for that. :)
Is there anywhere a good list of template variables?
As Calguy wrote there isn't yet, unfortunately. Well, there are threads in the forum discussing the general Smarty tags used in a template, but not listing other tags and modules that can also be used in a template. But such a list should be produced in the not too distant future and put in the docs. When the template editor is available all of that will be in the admin.

I think there also should be a CSS editor, similar to this one. Userability is one of CMS Made Simple's trademarks, but there is still a lot to work on, both with documentation and things such as what we're discussing here. The good thing is that the organisation is becoming really good now and there will very soon be a roadmap for 1.0 available. :D
Post Reply

Return to “General Discussion”