NYCPHP Meetup

NYPHP.org

[joomla] Converting a HTML/JavaScript page to be a module in Joomla

David Roth davidalanroth at gmail.com
Tue Jul 31 06:54:45 EDT 2012


I have a JavaScript program which does some simple calculations. It
emulates what you would do in a spreadsheet. It isn't fancy, but it is
functional and I want to make a Joomla module out of it. I didn't write a
CSS for this because it was intended to be used in Joomla from the start
and I want it to inherit the Joomla CSS that's resident.

My first thought was, create a custom HTML module, go into HTML editing
mode and paste the HTML page with it's JavaScript in there.

The result is, it didn't work. It kept the HTML formatting of the page, but
it filtered out all the JavaScript. There are no external files referencing
the JavaScript and jQuery is not being used. Maybe it needs to be an actual
mod_david_calc and that will do it? But I must be missing something else in
order to do that. Can't imagine getting away from free in Joomla without
having to call some Joomla function to make it work. :-)

So then I spent time searching and it appears some sort of special
treatment is needed for your own JavaScript to be available in Joomla.

Why I'm posting about this, is that I would like to get some direction as
to what is the best way to do this. Is there a favorite Joomla extension
people use to help make all this happen? Also, should it be a module or
can/should it be a Joomla Article for this JavaScript calc program? It only
needs to appear on one page. Thanks!

David Roth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/joomla/attachments/20120731/91ff6cbb/attachment.html>


More information about the Joomla mailing list