Earlier today, while working on troubleshooting an issue, I started seeing some odd behavior in cffile. When uploading a file supplied from a form, the accept attribute was rejecting files that should not be rejected. I decided to set up a little test, to get to the root of the issue.
The other day, as I fiddled with my weekend project, I stumbled into a concept that I had not thought of previously. I was looking to make it as easy as possible to make the app multi-lingual. In trying to separate the application from the translations, I came up with an interesting technique.
When you select a language, it loads records associated with your selected language. They have the attributes of “name” and “value”. It loops through the returned records and uses “name” as the variable name and “value” as the value. When you add a new record to the table, it automagically adds the new variable.
As you can see, addition of new translations pretty easy. Have a thought on the technique? Feel free to leave a comment or drop me a line.
So, you have a task where you are supposed to display X items but only Y items per page and only link to Z pages at any one time? This can be a fairly complex task. I figured that I would offer my ~80 line solution to the problem.
Here’s an example of what the output should look like.