1
RicoCali
One Large Pitfall of Smarty
  • 2004/1/4 19:49

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


Smarty is a great templating idea as it abstracts and separates content and presentation. The only problem is that there is not one IDE to support this. You are developing the presentation layer with your eyes close. For example <{$xoops_imageurl}>. Anyone know of "any" tool that can visually represent that reference so you can see how your presentation layer looks like? Also, <{include file =...}>. I see that everywhere and when you bring it into a WYSIWYG editor you are better off looking at it in notepad. Yeah I know, you can "temporarily" use the abosulte reference. But what's the point? That's just more tedious work prone for errors. So how does that make smarty a productive paradigm in terms of the presentation department?

2
Herko
Re: One Large Pitfall of Smarty
  • 2004/1/4 19:56

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Would you rather dive into the hardcoded files for each and every bit? Smarty is only used for dynamic elements. If you hardcode the imageurl, that's no problem on a live site...

Herko

3
svaha
Re: One Large Pitfall of Smarty
  • 2004/1/4 20:56

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


I simply use my test site on my own computer with a multi tab browser like MyIE, one tabe to make and save changes, one tab to look at the result.

Aloha

4
Mithrandir
Re: One Large Pitfall of Smarty

It's still better than having an all-PHP file which won't show ANYTHING unless it is running on a webserver.

5
Mithrandir
Re: One Large Pitfall of Smarty

Btw. speaking of SMARTY - does anyone know if the $smartyobject->force_compile works when the template is saved in the database?

And what is the reason for doing this? Is it to allow people to edit the templates from within XOOPS?

6
svaha
Re: One Large Pitfall of Smarty
  • 2004/1/5 0:31

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Dunno if this has anything to do with it Mithy but I use Zaja-X template and I don't have to make a clone of it, just edit/save and it works.

7
RicoCali
Re: One Large Pitfall of Smarty
  • 2004/1/5 1:22

  • RicoCali

  • Not too shy to talk

  • Posts: 120

  • Since: 2002/7/29


Quote:

MithyT2 wrote:
It's still better than having an all-PHP file which won't show ANYTHING unless it is running on a webserver.


If you dynamically generate static html then that is the case. Not a productive paradigm. If you keep static html static and dynamically create content then that is the correct paradigm. You don't need Smarty to do that. But Smarty proves to be this correct paradigm. But I don't think its heaven to develop the presentation layer using Smarty because no one supports it (from an IDE). If anyone can give me any tips that they have learned to make their life easier with Smarty templates from the presentation layer stand point I would appreciate it.

8
Jakobo
Re: One Large Pitfall of Smarty
  • 2004/1/5 6:04

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


One thing I have done is built a page entirely in an IDE such as Dreamweaver, and then extract the piece I need for my template. From there, I can reinsert the smarty tags I need, but it insures tables and stylesheet assignments will be doing exactly what I need them to.

Here is an example:
Kaizoku-Fansubs Web Forum

The template for each posting was extracted from the HTML, placed into dreamweaver, and the sections that were Smarty Tags were identified. It was then just a matter of modifying the template and reinserting the code back into Xoops.

I hope this helps!

9
CBlue
Re: One Large Pitfall of Smarty

Wow! Your site looks cool, Jakobo! Great job!

10
Jakobo
Re: One Large Pitfall of Smarty
  • 2004/1/5 6:46

  • Jakobo

  • Just popping in

  • Posts: 61

  • Since: 2003/12/18


Thanks! Eventually I am going to move the groupware backend (for admins to work on releases), the BitTorrent Tracker, and the IRC bot things into modules, but that requires time that I am unrelentlessly throwing at the groupware module. :)

Login

Who's Online

350 user(s) are online (208 user(s) are browsing Support Forums)


Members: 0


Guests: 350


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits