Artwork files for XML galleys

Hi @ajnyga,

There’s a test inside templates/controllers/grid/articleGalleys/form/articleGalleyForm.tpl to check for HTML files and display a grid of dependent files in that situation:

{if $articleGalleyFile && $articleGalleyFile->getFileType()=='text/html'}

You can add this to XML files as well by changing the test:

{if $articleGalleyFile && ($articleGalleyFile->getFileType()=='text/html' || $articleGalleyFile->getFileType()=='application/xml')}

This is a little hackier than I’d like but should be fine.

The HTML article galley plugin includes some code to rewrite the markup so that artwork file URLs behave as expected; if this suits your expectations, you might want to try porting some of that code over to the lens reader plugin as well. A PR would be welcome on this, if you think you end up with something broadly useful.

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes