72dpi wrote:Surprised no-one has answered this, I'd love to see this "hacked"
\administrator\components\com_media\views\media\tmpl\default.php
.....
Anyone got a clue how to override this from any given component?
Hey guys,
i've looked up the file /libraries/joomla/form/fields/media.php and found out, that you can use the parameter "link" in your xml-file to set the open link manually.
Try something like this:
Code: Select all
<field name="file" type="media" label="PDF" description="PDF File" size="40" class="inputbox" default="" required="true" directory="path_to_your_directory" link="index.php?option=com_media&view=media&tmpl=component&asset=com_yourcomponent&author=&fieldid=jform_file&folder=path_to_your_directory"/>
You just need to replace asset=... , filedid=... and folder=....
Hope this helps!
Best