On peut afficher une pièce jointe à l'endroit souhaité:

syntaxe: {attachments id=<id de la pièce jointe>}

Pièce(s) jointe(s):
Télécharger ce fichier (article-sud-ouest-1.pdf) article-sud-ouest-1.pdf1651 Ko

 

On peut aussi afficher toutes les pièces jointes associées à l'article:

syntaxe: {attachments}

 

Pièce(s) jointe(s):
Télécharger ce fichier (article-sud-ouest-1.pdf) article-sud-ouest-1.pdf1651 Ko
Télécharger ce fichier (drupal.jpg) drupal.jpg1 Ko
Télécharger ce fichier (parcours site 10km.pdf) parcours site 10km.pdf168 Ko
Télécharger ce fichier (parcours site 18km-2.pdf) parcours site 18km-2.pdf184 Ko

J'ai publié une modification du composant attachments pour Joomla 4 et Joomla 5

Elle est disponible sur github  attachments

JE suis devenu contributeur pour ce dépot github.

Pièce(s) jointe(s):
Accéder à cette adresse URL (attachments-4.1.0.zip)attachments-4.1.0.zip0 Ko

 

Principales nouveautés de Pièces Jointes 4.1.0

  • Le composant Pièces Jointes (depuis la version 4.0.0) fonctionne maintenant sur Joomla 4.x et 5.x.
  • Attachments 4.1.0 ajoute un bouton pour insérer {attachments id=xxx } dans les articles afin de choisir quelle pièce jointe afficher.
  • Attachments 4.1.0 cache les crochets vides dans la description des pièces jointes.
  • Attachments 4.1.0 ajoute la possibilité d'afficher des attachements dans une fénêtre popup.

 

Liens

 


 


Table CSS in Attachments

Question :Hello - do you have any templates for Table CSS in attachments
I want to be able to control headings, the table etc

Answer:

  1. Attachments lists are tables which have class 'attachmentsList' by default (but this can be overridden using the parameters 'attachments_table_style'). So with the css class for the header you can define cascading css rules that only affect attachments tables.
  2. You can also override the attachments template if you want to change the layout completely. However you will have to look out for possible changes in the future that might break your new template.

Question :

I’ve been using your attachments extension for years… since Joomla 2.5.  It’s been great!

I finally got around to updating for Joomla 4 and installed V4.04 into an upgraded environment.  I still have the old 3.x version installed but disabled as I have dozens of articles with attachments that I want to preserve with the update. 

The installation appears to go smoothly and has a whole set of “success” messages for all of the extensions it’s installing.   However, at the very end of the installation process I get:  0 Class "JRequest" not found

It completely corrupts the Admin portal and making it unusable as it can’t get past it.  

 

attachment_install_issue.png

 

It also affects the front end site if I click on one of the articles.    0 Call to undefined method Joomla\CMS\Factory::getURI().

Any advice?

Answer:

During the upgrade to attachments v4.0.4 all the parts get upgraded but the plugin framework is now placed in a new directory leaving the old one (v3) behind. You should probably have a “plugins/attachments/ attachments_plugin_framework” in your site which you can just rename so joomla doesn’t find it’s code. Generaly these are the steps that I have found to work without a problem to perfrorm the upgrade from attachments 3 to attachments 4: - take a backup - remove "Attachments - Plugin Framework" before upgrading to Joomla 4. If the site is already migrated to Joomla 4, you should first remove the folder plugins/attachments/attachments_plugin_framework and then remove it from the backend. - after upgrading the site to Joomla 4 install attachments 4.0.x - check if all parts of the Attachment extension are enabled