WordPress.org

Ready to get started?Download WordPress

Ideas

SMARTY(ish) theme engine

  1. nbw
    Member

    12345

    WordPress themes are wicked and annoying. It would be a killer if WordPress would have themes that could be done without the need to dig into php files.

    Posted: 7 years ago #
  2. riddddle
    Member

    12345

    I fully support idea to have simplier and more organized templates in WordPress.

    It's very hard to design some original layout without knowledge of databases and advanced server-side scripting. List of WP ready-made template functions is too short when we're talking about possibilities and too long when we're talking about understanding whole theme engine.

    As my predecessor said - we need some way to make WP themes without knowledge of PHP.

    Posted: 7 years ago #
  3. andyk
    Member

    12345

    although I use PHP, proper wordpress 'tags' would be much more user friendly (although I do quite like being able to hack wordpress output by adding extra PHP).

    Hmmm... I'm neither here nor there on this one...

    Posted: 7 years ago #
  4. nbw
    Member

    12345

    @andyk: I don't see why you would not be able to hack WordPress with proper template engine.

    How often do you hack wordpress? And in comparison: how often you or your friends would like to simply set a blog with custom theme without guessing what does what?

    There is much too much code in WordPress that does nothing important. In fact, don't you find useful to have:

    {$note.title}
    {$note.content}
    a href="{$site_root}/template/{$note.stub}"

    rather than PHP code inside your template?

    I'm a project manager working at a Content Management System that utilises SMARTY (modified) engine and our clients are still able to write their own specific plugins and hack the system if needed.

    Yet, the template system provides a clean and meaningful API that everyone can learn in less than one day.

    Posted: 7 years ago #
  5. porneL
    Member

    I'm all for templates.

    However Smarty would be OK only if WordPress got in touch with reality and removed slashes littering their text/HTML.

    OTOH if WordPress is serious about using XHTML, they should start doing so by switching to templating system that is suitable for XHTML (PHPtal maybe?).

    Posted: 7 years ago #
  6. dje
    Member

    12345

    What about using K2 or the sandbox theme? Then you only need to edit the CSS without worrying about PHP.

    Posted: 7 years ago #
  7. nbw
    Member

    12345

    dje: I'm using K2 on all my weblogs but only for one reason: K2 has great sidebar module. Its code structure is still an overkill for most blogs.

    Posted: 7 years ago #
  8. corourke
    Member

    12345

    Focusing on clean semantic markup vs smarty templating seems a far better way to go. I chose wordpress quite specifically for it's natural clean templating system. There are pure css themes mentioned above that don't involve php editing and those of us who like both php and css also have the choice of going crazy with our design.

    Posted: 7 years ago #
  9. nbw
    Member

    12345

    What has semantic markup to do with clean template? How can you compare clean semantic markup vs smarty templating as it's the same thing? SMARTY does not stand in semantic documents way.

    Smarty sets you free out of php injections in the template. That's all. If it is done the proper way it only provides variables that are easily attached to the template. No additional HTML code. You only insert variables and wrap them around your own personally written HTML code.

    It is faster, easier and more secure way than meddling with PHP files. And no - changing the CSS files is not always the solution -- when the layout is far more complicated and could be done other way. Not to mention that default templates need to be as generic as can be, which means that specific layout may need modifications in PHP files where there is HTML code embedded.

    We have a similar solution in our CMS system:

    http://enbewu.net/download/001-articles-wego.ogg

    There are many modules that provide simple API with variables easily insertable into HTML documents. That's an example of website nearly as complicated as a typical blog. A more robust solution would require about 12 lines of code.

    You need OGG Theora codec to watch the screencast. Install VideoLan (http://videolan.org) if needed.

    As for now WordPress abuses the term Code is Poetry. It mixes Shakespear with Rap slang.

    Posted: 7 years ago #
  10. riddddle
    Member

    12345

    CSS editing won't allow you to change HTML structure. Anyways, dedicated HTML suits designers needs in the most efficient way.

    Unfortunately I know what I'm talking about. I'm part of the team which is designing themes for polish instant messenger Konnekt. This IM has fixed HTML template and you had to act crazy in CSS (and sometimes incorporate JS via expression() because engine was IE-like). It was no fun. I mean, I learnt a lot, but the whole idea is terrible.

    Same thing with CSS editing.

    Just let us choose between templating engine – like it is done in Drupal CMS – and we'll all be happy.

    Posted: 7 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    137 Votes
  • Status

    Sorry, not right now