Skip to content

Commit

Permalink
feat: rename default asset name from head to main
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jun 7, 2023
1 parent 119e97c commit fc3d1ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -1747,15 +1747,15 @@ public function seo()
* $rockfrontend->scripts()->add(...)->add(...)->render();
*
* // file1.php
* $rockfrontend->scripts('head')->add(...);
* $rockfrontend->scripts('main')->add(...);
* // file2.php
* $rockfrontend->scripts('head')->add(...);
* $rockfrontend->scripts('main')->add(...);
* // _main.php
* $rockfrontend->scripts('head')->render();
* $rockfrontend->scripts('main')->render();
*
* @return ScriptsArray
*/
public function scripts($name = 'head')
public function scripts($name = 'main')
{
if (!$this->scripts) $this->scripts = new WireData();
$script = $this->scripts->get("rockfrontend-script-$name") ?: new ScriptsArray($name);
Expand All @@ -1778,7 +1778,7 @@ public function scripts($name = 'head')
*
* @return StylesArray
*/
public function styles($name = 'head', $cssDir = null)
public function styles($name = 'main', $cssDir = null)
{
if (!$this->styles) $this->styles = new WireData();
$style = $this->styles->get("rf-style-$name") ?: new StylesArray($name);
Expand Down

0 comments on commit fc3d1ae

Please sign in to comment.