Feature #87446

Global variable 'SITE:'

Added by corbet dynie about 1 month ago. Updated about 1 month ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2019-01-15
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

It would be nice to get a new variable like 'EXT:' for the site/s path.
So you can use it at 'includeJS', 'includeCSS', etc.
'includeJS.file1 = SITE:/js/file1.js' => /typo3conf/sites/default/js/file1.js

Possible solution:
'SITE:/' => path from the current site (eg.: /typo3conf/sites/default)

'SITE:<identifier>/' => path from the selected site (eg.: /typo3conf/sites/<identifier>)
'SITE:custom1/' => path from the selected site (custom1) (eg.: /typo3conf/sites/custom1)

History

#1 Updated by Georg Ringer about 1 month ago

  • Status changed from New to Needs Feedback

thanks for creating the issue!

With #87434 you will get the side identifier back and can build anything you want.

I currently don't see the benefits for your request because with using composer, the sites directory is outside of the web directory and therefore no assets can be included from there. do you agree that the issue can be closed once #87434is merged?

#2 Updated by corbet dynie about 1 month ago

First thanks for the reply.

As described here https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/SiteHandling/Basics.html#site-configuration-storage, I want to use some js/css files in the site folder.
"[...] In the future this folder can (and should) be used for more files like Fluid templates, and Backend layouts."

The problem is, if you want to make the path more dynamicly:

includeJS.file1 = /typo3conf/sites/{site:identifier}/js/file1.js
includeJS.file1.insertData = 1

will not work, because the 'file1' is type data and there is no stdWrap.
https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Page/Index.html#includejs-array

Also available in: Atom PDF