1

I'd like to include an XML form field in my template that allows the user to upload an image file for the company logo. I know how to do this for a regular component's administrator control panel, but stumped on doing it for a template (there's no separate tmpl file creating the control panel, just my templateDetails.xml file).

Can anyone point me in the right direction? I've read the instructions here and am still unclear:

https://docs.joomla.org/Special:MyLanguage/How_to_use_the_filesystem_package

1

Here's a possibile workaround for you to get you going quickly:

Include a form field on the template administration tab that points to an existing image file, and include a note that the user should upload the image through Joomla's media manager.

That will at least get you started with something that works for the user, even if it's not precisely what you're after.

And it turns out I had more time before I had to go than I thought, so I had time to double-check something:

The form field type you're looking for is "media" and it goes in the templateDetails.xml file. It would go in the "config" section of that file. For example, if you wanted it on a tab called "Fred" you would have

    <config>
      <fields name="params">
        <fieldset name="Fred">

followed by the details of the field you were adding. (Then close the hierarchy, of course).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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