Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dateiverwaltung: Meta-Felder #717

Closed
pressi opened this issue Mar 3, 2017 · 4 comments
Closed

Dateiverwaltung: Meta-Felder #717

pressi opened this issue Mar 3, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@pressi
Copy link

pressi commented Mar 3, 2017

Hallo!

Im Backend ist es jetzt zwar möglich ein neues Meta-Feld hinzuzufügen für eine Sprache.

Auszug aus dem dca > tl_files.php > Feld: meta > eval (Zeile #221):

'metaFields'=>array('title'=>'maxlength="255"', 'alt'=>'maxlength="255"', 'link'=>'maxlength="255"', 'caption'=>'maxlength="255"'

Die Ausgabe eines neuen Feldes funktioniert aber nicht.
In der Controller.php, Funktion: addImageToTemplate sind die Felder hardcoded hinterlegt (Zeile #1605):

$objTemplate->src = TL_FILES_URL . $src;
$objTemplate->alt = \StringUtil::specialchars($arrItem['alt']);
$objTemplate->title = \StringUtil::specialchars($arrItem['title']);
$objTemplate->linkTitle = \StringUtil::specialchars($arrItem['linkTitle'] ?: $arrItem['title']);
$objTemplate->fullsize = $arrItem['fullsize'] ? true : false;
$objTemplate->addBefore = ($arrItem['floating'] != 'below');
$objTemplate->margin = static::generateMargin($arrMargin);
$objTemplate->caption = $arrItem['caption'];
$objTemplate->singleSRC = $arrItem['singleSRC'];
$objTemplate->addImage = true;

Und was auch noch gut wäre ist wenn nicht nur input's möglich wären als Felder, sondern auch z.B. eine textarea oder für das Link-Feld der Link-Wizard zum auswählen von einer Seite oder einer anderen Datei (PDF's bei Bildern z.B.).

Liebe Grüße
pressi

@fritzmg
Copy link
Contributor

fritzmg commented Mar 4, 2017

You simply need to fetch the meta data yourself with \FilesModel::findBy….

@pressi
Copy link
Author

pressi commented Mar 12, 2017

Ja aber im ce_image und gallery_default Template wäre es ja einfacher wenn solche Felder bereits dabei wären und man nicht extra wieder das ganze Bild hereinladen müsste damit man die restlichen Meta-Felder bekommt.

@leofeyer leofeyer added the bug label Mar 14, 2017
@leofeyer leofeyer added this to the 4.4.0 milestone Mar 14, 2017
@Toflar
Copy link
Member

Toflar commented Mar 20, 2017

Hat mich auch schon genervt. 👍

@leofeyer
Copy link
Member

leofeyer commented May 9, 2017

Behoben in 0fb2a89.

@leofeyer leofeyer closed this as completed May 9, 2017
leofeyer pushed a commit that referenced this issue Sep 3, 2019
#717)

Description
-----------

This PR provides two new routes:

* `/favicon.ico` which provides the icon you can now select in the root page settings (the fallback one).
* `/robots.txt` which provides the `robots.txt` for any root page (the fallback one). Users can manually enter content plus we have an event that allows us to extend it dynamically. The core uses it to dynamically add all `sitemap.xml` entries making it super convenient for users 🎉

Commits
-------

06b25127 Dynamically load robots.txt and favicon.ico per root domain page and allow them to be extended using an event
c94ebe41 Make response tagger optional
750facb6 CS
a8d2c3d6 Fixed RobotsTxtListener and added unit tests
777dee61 Fix the coding style
f7e132a3 Add the options to $arrOptions so the model is not fetched from the registry if there are options
d4e14ffc Fix the coding style
c0cc9617 Fix the tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants