Closed olimortimer closed 3 years ago
Hello, @olimortimer
Every tag should have unique name
Meta::addStyle('style.css', 'http://site.com/style1.css');
Meta::addStyle('style2.css', 'http://site.com/style2.css');
Thank you, I didn't even think to try that. Apologies.
Describe the bug When using addStyle multiple times, only the last one is inserted into the page via toHtml. I can't see to find a way of adding multiple stylesheets using the API
To Reproduce
Meta::addStyle('style.css', 'http://site.com/style1.css');
Meta::addStyle('style.css', 'http://site.com/style2.css');
Only style2.css is inserted into the page.
<link media="all" type="text/css" rel="stylesheet" href="http://site.com/style2.css">
Expected behavior I would expect both to be inserted.
<link media="all" type="text/css" rel="stylesheet" href="http://site.com/style1.css">
<link media="all" type="text/css" rel="stylesheet" href="http://site.com/style2.css">
Additional context Also, the name parameter is ignored, and doesn't seem to be used, so there's no need to pass
style.css
I would guess this might also be the case for addScript?