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

loading assets in extensions #1

Open
FantomX1 opened this issue Jun 17, 2020 · 0 comments
Open

loading assets in extensions #1

FantomX1 opened this issue Jun 17, 2020 · 0 comments

Comments

@FantomX1
Copy link
Owner

FantomX1 commented Jun 17, 2020

install to a particular filepath immediately after composer issue && ln -s add to the documentation
add datatables parameter loadBootstrap
(automatically in load or use seek for install path or locate for a public cdn)

similar solution independently is in Yii 2 assets publification

though, doing it ourselves, finding that the SCRIPT_FILENAME must be obviously above the document root, document root might be though much more below, here url path might be similar to script filename part, though not completely as it might include also the artificial part of the url, so it will be better to rely on SCRIPT_FILENAME to obtain the canonical relative part of the path, to reflect assets correctly to th running script regardless to where is document root configured to be

other defining constraints

  • the document root is an absolute system filepath
  • SERVER_SCRIPT as as far I know also the full system filepath so the common part of the path may be removed, as the server script must reside inside the document root, therefore the remaining will reflect the correct relative path to the assets, given the script already addresses assets correctly relatively like if being nested index.php ../css, and similarly the SCRIPT_URL should reflect the same unless htaccess pretty url is used, where it would not need to remove the absolute part of the path below the document root, as it is in it's nature inside the document root unless just perhaps some special cgi scripts aliases would be used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant