$page->code()
Filters the Files collection by type code
$page->code(): Kirby\Cms\Files
Return type
This method modifies the existing $page object it is applied to and returns it again.
Parent class
What is a code file?
Kirby considers the following file types as code:
- css
 - js
 - json
 - java
 - rb
 - py
 - scss
 - xml
 - yaml
 - yml
 
Any html or php files cannot be uploaded to pages for security reasons.
Examples
<?php foreach($page->code()->filterBy('extension', 'css') as $css): ?>
<?= css($css->url()) ?>
<?php endforeach ?>