Abbreviations:
TE = template engine(s)
in the 80’s 90’s we did all kinds of fun things with cars. Example throwing ford ranger suspension under a ford pinto along with maybe a 351w for fun :-). Why? Why not? it was fun, and never got stuck in the snow.
I am that way with programming as well (I have lots of hobbies lol). I am ware of TE on the web, and some are very nice, and will eventually try them, but PHP does it well enough that you can tweak it for your personal needs.
NOTE: I am VERY VERY burned out on the PHP internal templating debate. This is a given, but it makes for messy code, SO no comments on that aspect please.
SLOPPY:
<ul>
foreach(array as $row=>$data) {
if(some arg == some arg){
do this
} else
do some stuff with it for presentation
}
</ul>
CLEAN:
<ul>{keyword}</ul>
I am wrote a proprietary template engine for my site. works perfect (even a custom procedural MVC too ). the only part of it that is sloppy is the looping. it is uh- uh- glee!!!
the pattern is the same as most mvc, url = controller. my controller does all the dirty work then sends all the info to the render and then display.
What I want to do is expand on this. I need to get the loops to work in the effect of {-loop $keyword col:5}
loop the data in a table 5 cells wide.
I did some searching on existing TE, and very hard to decipher what they are doing (one reason I am not a fan of OOP - “don’t go there - start a diff topic or email me”)
So any tips or suggestions (will even do a kludge since it is my own system). I was looking into searching string with wild card, but no go. was hoping php had a built in function for that (preg_match??)
My goal is to make this a fully CLEANED up TE for other affiliates that work with the products I do (and there are thousands out there that do, the only problem, is the parent company only offers one pre buit website, so all their affiliates have a basic site that pretty much looks like their competitors - I puts some other basic sites up over the last 10yrs, but I want something more pro. that is geared specifically for these products.
thanks again!!! Love this site - got many good ideas from it. So thought i would join