Welcome to Geeklog, Anonymous Monday, December 09 2024 @ 07:51 am EST
Geeklog Forums
GL2 and templates?
NeoNecro
I wass suprised about xoops, it uses a template engine called Smarty and it's really fun to use, it's possible to create themes with just ONE file and you don't have to use tables!
So I thought maybe it would be nice if GL2 uses something like that. Do you guys allready have a template engine or dous it still has to be created? If there is one, what are the big improvements?
grtz
dimis-site.be
Dirk
In a word: Yes.
I'm not up to date on the decision process (GL2 is mainly Tony's baby), but Smarty was one of the candidates at one point. Flexy was another, IIRC. But no final decision has been made, AFAIK.
bye, Dirk
NeoNecro
Thanks for the info and let us know when the final decision has been made.
grtz
dimis-site.be
nitebyte
By using includes in smarty, you can actually have something like (includes shown by indentation):
main.tpl
...header.tpl
...menu.tpl
...leftblocks.tpl
......leftblocksingle.tpl
...maincontent.tpl
......featuredblock.tpl
......contentblocks.tpl
...rightblocks.tpl
...footer.tpl
One major benefit from this is that no one will be limited to using the exact same template file names. In fact, you could use just one template file for the whole site, if done right. This will allow anyone to design a layout easily without having to cut it up into individual files and having 2 files for each area: 1 to open the area, use another content file, and then another 1 to close the area.
If needed, I can supply you with some great examples of my own code, like the smarty code I used for http://www.vanderbilts.com
vinny
We did look at Smarty, but Flexy has all the benefits of Smarty with a few more. Besides fitting our design very nicely, Flexy is also even faster than Smarty and doesn't have all the bloat that has crept into Smarty.
-Vinny
vinny
FWIW, this seems to be the home of Flexy. I tried the second google hit, but it didn't look like a template engine.
Edit: This seems to be where "MVCnPHP" lives.
- Andy
Both those links are correct. If I had been a goog webizen I would have linked to those from my previous post.
Thanks,
Vinny
kingboyk
It would make sense for me to use a template and database calls to generate these pages. I also want to get rid of the welcome message and date from the top of these pages, as without any left or right blocks they waste a lot of screen real estate. It seems the only way I can do this now is by coding with $_BLOCK_TEMPLATE etc. I've tried a few times but it's just way beyond me as a geeklog and php beginner. Instead, I'm gonna have to copy and paste lots of duplicate HTML or put all my into HTML into the database.
It's hard to believe that static pages are so inflexible. What I would like to request is the ability to select a header and footer template for each static page. Simple and elegant IMHO, and I'm sure really easy for you smart guys to implement.
Thanks, Steve
Dirk
This really hasn't anything to do with what's being discussed in this thread so far, but you can override the static pages block templates. Please use the search and if you can't figure it out, start a new thread.
bye, Dirk
(Blaine, how's that "splitting a forum thread" function coming along?)
someone
asmaloney
I used XSLT for my Amazon plugin so I could learn about it. What an abomination! The syntax is horrible, the logic paths not so logical, and it is impossible to debug. [Just my experience of course.]
I don't think this is the way to go if you actually want people to be able to create themes.
someone
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content