mirror of
https://github.com/typemill/typemill.git
synced 2025-08-06 06:07:31 +02:00
Version 1.3.4: Media Library
This commit is contained in:
22
system/Extensions/TwigPagelistExtension.php
Normal file
22
system/Extensions/TwigPagelistExtension.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Typemill\Extensions;
|
||||
|
||||
use Typemill\Models\Folder;
|
||||
|
||||
class TwigPagelistExtension extends \Twig_Extension
|
||||
{
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new \Twig_SimpleFunction('getPageList', array($this, 'getList' ))
|
||||
];
|
||||
}
|
||||
|
||||
public function getList($folderContentDetails, $url)
|
||||
{
|
||||
$pagelist = Folder::getItemForUrlFrontend($folderContentDetails, $url);
|
||||
|
||||
return $pagelist;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user