I've written a rendererer library (on basis of JDocumentHTML) for Joomla 3, needed for a component of mine. It has to be put in a subfolder of /libraries/joomla/document for now. Now I'd like to pack it and make it installable via the package installer of joomla. I've found no tutorial and no book so far emphasizing the way to do it, except an old post explaining a little bit how to make ONE library (and not a rendering one) able to be installed at the root of the library folder in Joomla 1.6.

Does anybody know how to do that?

More informations and reformulation:

I got this PDF rendering class, which is extending JDocument, stuffed in a custom library. Ideally, I not only want to be able to distribute a .zip of this library in order to make it installable via the file manager. That I have already done. I would like to be able to actually render something using it.

Extending the core Joomla rendering functions is a really easy thing to do if you copy your custom renderer to the right place via ftp (to /libraries/joomla/document/ to be specific), but I don't have a clue how to do it via a custom library installed through the extension mananger, in order not to mess around in the vendor directories.

So for now, I have:

  • packed my rendering library.
  • installed it. that works. Now, how could I actually use it?

4 Answers 4


You will need to combine the component and library into a package type extension.

So create a new XML file and make sure the type it set correctly like so:

<extension type="package" version="3.0" method="upgrade">

Then you need to define what extensions will be installed within the package like so:

<files folder="packages">
   <file type="component" id="com_helloworld" >com_helloworld.zip</file>
   <file type="library" id="helloworld">lib_helloworld.zip</file>

For more information on this, have a read of the following



OK, I found a way.

Basically, the simplest way to make it accessible is to write your library.xml in order to make it a mere addon to jdocument. In my case, wanting to do a PDF renderer, my library structure was as follows


and my pdf.xml as follows:

<?xml version="1.0" encoding="utf-8"?>
<extension type="library" version="3.x" method="upgrade">
    <name>PDF rendering addon</name>
    <license>GNU LESSER GENERAL PUBLIC LICENSE Version 2</license>
    <description>Addon to enable JDocument to render PDF</description>

In fact, this does exactly what I did manually before: it installs the library into the vendor folders. Not the best way I'm sure, but I couldn't figure out something else


It is not a best practice to add your classes into a existing directory. In future, the owner might overwrite it.

In general, lilbraries are installed at /libraries and auto-loaded when needed.

  • Of course it's not best practice, that is why I want to do it with a package. But I don't find any piece of information on how to let the view be rendered by my own custom library instead of any subclass of JDocument found in the /libraries/joomla/document folder.
    – Khaarkh
    Jan 31, 2015 at 13:59

I had the same problem as you some time ago. Here are some tips:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.