Twig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7").
Previous exceptions
  • You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7 (1064)
Twig\Error\RuntimeError thrown with message "An exception has been thrown during the rendering of a template ("You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7")." Stacktrace: #54 Twig\Error\RuntimeError in /home/b/baycik/diyar.im/public_html/media/gantry5/engines/nucleus/particles/module.html.twig:4 #53 JDatabaseExceptionExecuting in /home/b/baycik/diyar.im/public_html/libraries/joomla/database/driver/mysqli.php:665 #52 JDatabaseDriverMysqli:execute in /home/b/baycik/diyar.im/public_html/libraries/joomla/database/driver.php:1506 #51 JDatabaseDriver:loadAssocList in /home/b/baycik/diyar.im/public_html/components/com_ilimhane/models/Author.php:54 #50 IlimhaneModelAuthor:authorGetProfileDetails in /home/b/baycik/diyar.im/public_html/components/com_ilimhane/models/Author.php:17 #49 IlimhaneModelAuthor:authorComposeByFilter in /home/b/baycik/diyar.im/public_html/modules/mod_ilimhane/mod_ilimhane.php:166 #48 include in /home/b/baycik/diyar.im/public_html/libraries/src/Helper/ModuleHelper.php:200 #47 Joomla\CMS\Helper\ModuleHelper:renderModule in /home/b/baycik/diyar.im/public_html/libraries/src/Document/Renderer/Html/ModuleRenderer.php:98 #46 Joomla\CMS\Document\Renderer\Html\ModuleRenderer:render in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Framework/Platform.php:195 #45 Gantry\Framework\Platform:displayModule in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:704 #44 call_user_func_array in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:704 #43 Twig\Template:getAttribute in /home/b/baycik/diyar.im/public_html/cache/gantry5/g5_helium/twig/f3/f33e020a7c995c3091226ca5bf2951dd75aa163487741287c6ac4232bb3ab724.php:43 #42 __TwigTemplate_fa24ad7ba18b08a067dfafc88f8f31a8672f91eab329b460a51c1786e9023d78:block_particle in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:216 #41 Twig\Template:displayBlock in /home/b/baycik/diyar.im/public_html/cache/gantry5/g5_helium/twig/72/72fe691d71be39d50030851067d8119b7647bba7855e0d1db5389a5d2ee3b093.php:73 #40 __TwigTemplate_65b2adc0b8fc17c3166ffc5b2c534f81cd1ec81c50d53706d96ed2bd3d2c3700:doDisplay in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #39 Twig\Template:displayWithErrorHandling in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #38 Twig\Template:display in /home/b/baycik/diyar.im/public_html/cache/gantry5/g5_helium/twig/f3/f33e020a7c995c3091226ca5bf2951dd75aa163487741287c6ac4232bb3ab724.php:35 #37 __TwigTemplate_fa24ad7ba18b08a067dfafc88f8f31a8672f91eab329b460a51c1786e9023d78:doDisplay in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #36 Twig\Template:displayWithErrorHandling in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #35 Twig\Template:display in /home/b/baycik/diyar.im/public_html/cache/gantry5/g5_helium/twig/40/40a68c93f9fa61bdbf6a23e309fe06cf50b144274eb149d4c92319eba9049b3f.php:53 #34 __TwigTemplate_e3ac87ee957206f0e3e7a15f8428ebb8943621df7c8387192aaaad3239284aa2:doDisplay in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #33 Twig\Template:displayWithErrorHandling in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #32 Twig\Template:display in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:434 #31 Twig\Template:render in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/TemplateWrapper.php:47 #30 Twig\TemplateWrapper:render in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Environment.php:384 #29 Twig\Environment:render in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/AbstractTheme.php:163 #28 Gantry\Component\Theme\AbstractTheme:render in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/ThemeTrait.php:766 #27 Gantry\Framework\Theme:getContent in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/ThemeTrait.php:666 #26 Gantry\Framework\Theme:renderContent in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/ThemeTrait.php:593 #25 Gantry\Framework\Theme:prepareLayout in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/ThemeTrait.php:579 #24 Gantry\Framework\Theme:prepareLayout in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/ThemeTrait.php:579 #23 Gantry\Framework\Theme:prepareLayout in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/ThemeTrait.php:579 #22 Gantry\Framework\Theme:prepareLayout in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/ThemeTrait.php:422 #21 Gantry\Framework\Theme:segments in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:702 #20 Twig\Template:getAttribute in /home/b/baycik/diyar.im/public_html/cache/gantry5/g5_helium/twig/33/338d1ce3e48aeca3c38dcaa34b84b0db9f26e4cdc7d62420ac1e48e9522c3306.php:47 #19 __TwigTemplate_11b94903ac9c38de4bb2105a5066ee742973b4957d19cccc6fa09167e85a5546:doDisplay in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #18 Twig\Template:displayWithErrorHandling in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #17 Twig\Template:display in /home/b/baycik/diyar.im/public_html/cache/gantry5/g5_helium/twig/5a/5a9c061f91d7ca9e615210fa73ebddac3d62aa7de47b8be54b4a5f3517f4cab8.php:35 #16 __TwigTemplate_277af7fe659c06d904eb257d5eb4bd19d8ee1919fab0c34eba6f071815650844:doDisplay in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #15 Twig\Template:displayWithErrorHandling in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #14 Twig\Template:display in /home/b/baycik/diyar.im/public_html/cache/gantry5/g5_helium/twig/54/546c22eede2b41fbdf4f134b6757afffe7a54ce26a7295501abc0a81a19bdbb9.php:35 #13 __TwigTemplate_97f532d943bf881f0138e74af281e2606c8525f3ee65d2e711ad60e46a5eb82e:doDisplay in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:455 #12 Twig\Template:displayWithErrorHandling in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:422 #11 Twig\Template:display in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Template.php:434 #10 Twig\Template:render in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/TemplateWrapper.php:47 #9 Twig\TemplateWrapper:render in /home/b/baycik/diyar.im/public_html/libraries/gantry5/vendor/twig/twig/src/Environment.php:384 #8 Twig\Environment:render in /home/b/baycik/diyar.im/public_html/libraries/gantry5/classes/Gantry/Component/Theme/AbstractTheme.php:163 #7 Gantry\Component\Theme\AbstractTheme:render in /home/b/baycik/diyar.im/public_html/templates/g5_helium/index.php:23 #6 require in /home/b/baycik/diyar.im/public_html/libraries/src/Document/HtmlDocument.php:668 #5 Joomla\CMS\Document\HtmlDocument:_loadTemplate in /home/b/baycik/diyar.im/public_html/libraries/src/Document/HtmlDocument.php:730 #4 Joomla\CMS\Document\HtmlDocument:_fetchTemplate in /home/b/baycik/diyar.im/public_html/libraries/src/Document/HtmlDocument.php:545 #3 Joomla\CMS\Document\HtmlDocument:parse in /home/b/baycik/diyar.im/public_html/libraries/src/Application/CMSApplication.php:1030 #2 Joomla\CMS\Application\CMSApplication:render in /home/b/baycik/diyar.im/public_html/libraries/src/Application/SiteApplication.php:778 #1 Joomla\CMS\Application\SiteApplication:render in /home/b/baycik/diyar.im/public_html/libraries/src/Application/CMSApplication.php:202 #0 Joomla\CMS\Application\CMSApplication:execute in /home/b/baycik/diyar.im/public_html/index.php:51
Stack frames (55)
54
Twig
\
Error
\
RuntimeError
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
media
/
gantry5
/
engines
/
nucleus
/
particles
/
module.html.twig
4
53
JDatabaseExceptionExecuting
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
joomla
/
database
/
driver
/
mysqli.php
665
52
JDatabaseDriverMysqli
execute
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
joomla
/
database
/
driver.php
1506
51
JDatabaseDriver
loadAssocList
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
components
/
com_ilimhane
/
models
/
Author.php
54
50
IlimhaneModelAuthor
authorGetProfileDetails
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
components
/
com_ilimhane
/
models
/
Author.php
17
49
IlimhaneModelAuthor
authorComposeByFilter
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
modules
/
mod_ilimhane
/
mod_ilimhane.php
166
48
include
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
src
/
Helper
/
ModuleHelper.php
200
47
Joomla
\
CMS
\
Helper
\
ModuleHelper
renderModule
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
src
/
Document
/
Renderer
/
Html
/
ModuleRenderer.php
98
46
Joomla
\
CMS
\
Document
\
Renderer
\
Html
\
ModuleRenderer
render
/
classes
/
Gantry
/
Framework
/
Platform.php
195
45
Gantry
\
Framework
\
Platform
displayModule
/
vendor
/
twig
/
twig
/
src
/
Template.php
704
44
call_user_func_array
/
vendor
/
twig
/
twig
/
src
/
Template.php
704
43
Twig
\
Template
getAttribute
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
f3
/
f33e020a7c995c3091226ca5bf2951dd75aa163487741287c6ac4232bb3ab724.php
43
42
__TwigTemplate_fa24ad7ba18b08a067dfafc88f8f31a8672f91eab329b460a51c1786e9023d78
block_particle
/
vendor
/
twig
/
twig
/
src
/
Template.php
216
41
Twig
\
Template
displayBlock
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
72
/
72fe691d71be39d50030851067d8119b7647bba7855e0d1db5389a5d2ee3b093.php
73
40
__TwigTemplate_65b2adc0b8fc17c3166ffc5b2c534f81cd1ec81c50d53706d96ed2bd3d2c3700
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
39
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
38
Twig
\
Template
display
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
f3
/
f33e020a7c995c3091226ca5bf2951dd75aa163487741287c6ac4232bb3ab724.php
35
37
__TwigTemplate_fa24ad7ba18b08a067dfafc88f8f31a8672f91eab329b460a51c1786e9023d78
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
36
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
35
Twig
\
Template
display
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
40
/
40a68c93f9fa61bdbf6a23e309fe06cf50b144274eb149d4c92319eba9049b3f.php
53
34
__TwigTemplate_e3ac87ee957206f0e3e7a15f8428ebb8943621df7c8387192aaaad3239284aa2
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
33
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
32
Twig
\
Template
display
/
vendor
/
twig
/
twig
/
src
/
Template.php
434
31
Twig
\
Template
render
/
vendor
/
twig
/
twig
/
src
/
TemplateWrapper.php
47
30
Twig
\
TemplateWrapper
render
/
vendor
/
twig
/
twig
/
src
/
Environment.php
384
29
Twig
\
Environment
render
/
classes
/
Gantry
/
Component
/
Theme
/
AbstractTheme.php
163
28
Gantry
\
Component
\
Theme
\
AbstractTheme
render
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
766
27
Gantry
\
Framework
\
Theme
getContent
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
666
26
Gantry
\
Framework
\
Theme
renderContent
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
593
25
Gantry
\
Framework
\
Theme
prepareLayout
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
579
24
Gantry
\
Framework
\
Theme
prepareLayout
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
579
23
Gantry
\
Framework
\
Theme
prepareLayout
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
579
22
Gantry
\
Framework
\
Theme
prepareLayout
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
422
21
Gantry
\
Framework
\
Theme
segments
/
vendor
/
twig
/
twig
/
src
/
Template.php
702
20
Twig
\
Template
getAttribute
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
33
/
338d1ce3e48aeca3c38dcaa34b84b0db9f26e4cdc7d62420ac1e48e9522c3306.php
47
19
__TwigTemplate_11b94903ac9c38de4bb2105a5066ee742973b4957d19cccc6fa09167e85a5546
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
18
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
17
Twig
\
Template
display
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
5a
/
5a9c061f91d7ca9e615210fa73ebddac3d62aa7de47b8be54b4a5f3517f4cab8.php
35
16
__TwigTemplate_277af7fe659c06d904eb257d5eb4bd19d8ee1919fab0c34eba6f071815650844
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
15
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
14
Twig
\
Template
display
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
cache
/
gantry5
/
g5_helium
/
twig
/
54
/
546c22eede2b41fbdf4f134b6757afffe7a54ce26a7295501abc0a81a19bdbb9.php
35
13
__TwigTemplate_97f532d943bf881f0138e74af281e2606c8525f3ee65d2e711ad60e46a5eb82e
doDisplay
/
vendor
/
twig
/
twig
/
src
/
Template.php
455
12
Twig
\
Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
src
/
Template.php
422
11
Twig
\
Template
display
/
vendor
/
twig
/
twig
/
src
/
Template.php
434
10
Twig
\
Template
render
/
vendor
/
twig
/
twig
/
src
/
TemplateWrapper.php
47
9
Twig
\
TemplateWrapper
render
/
vendor
/
twig
/
twig
/
src
/
Environment.php
384
8
Twig
\
Environment
render
/
classes
/
Gantry
/
Component
/
Theme
/
AbstractTheme.php
163
7
Gantry
\
Component
\
Theme
\
AbstractTheme
render
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
templates
/
g5_helium
/
index.php
23
6
require
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
src
/
Document
/
HtmlDocument.php
668
5
Joomla
\
CMS
\
Document
\
HtmlDocument
_loadTemplate
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
src
/
Document
/
HtmlDocument.php
730
4
Joomla
\
CMS
\
Document
\
HtmlDocument
_fetchTemplate
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
src
/
Document
/
HtmlDocument.php
545
3
Joomla
\
CMS
\
Document
\
HtmlDocument
parse
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
src
/
Application
/
CMSApplication.php
1030
2
Joomla
\
CMS
\
Application
\
CMSApplication
render
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
src
/
Application
/
SiteApplication.php
778
1
Joomla
\
CMS
\
Application
\
SiteApplication
render
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
libraries
/
src
/
Application
/
CMSApplication.php
202
0
Joomla
\
CMS
\
Application
\
CMSApplication
execute
/
home
/
b
/
baycik
/
diyar.im
/
public_html
/
index.php
51
{% extends '@nucleus/partials/particle.html.twig' %}
 
{% block particle %}
    {{ gantry.platform.displayModule(particle.module_id, {'style': particle.chrome|default('gantry'), 'position': 'particle'})|raw }}
{% endblock %}
 
                catch (RuntimeException $e)
                {
                    // Get the error number and message.
                    $this->errorNum = $this->getErrorNumber();
                    $this->errorMsg = $this->getErrorMessage();
 
                    JLog::add(JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg), JLog::ERROR, 'database-error');
 
                    throw new JDatabaseExceptionExecuting($query, $this->errorMsg, $this->errorNum, $e);
                }
 
                // Since we were able to reconnect, run the query again.
                return $this->execute();
            }
            // The server was not disconnected.
            else
            {
                JLog::add(JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg), JLog::ERROR, 'database-error');
 
                throw new JDatabaseExceptionExecuting($query, $this->errorMsg, $this->errorNum);
            }
        }
 
        return $this->cursor;
    }
 
    /**
     * Renames a table in the database.
     *
     * @param   string  $oldTable  The name of the table to be renamed
     * @param   string  $newTable  The new name for the table.
     * @param   string  $backup    Not used by MySQL.
     * @param   string  $prefix    Not used by MySQL.
     *
     * @return  JDatabaseDriverMysqli  Returns this object to support chaining.
     *
     * @since   3.0.1
     * @throws  RuntimeException
     */
    public function renameTable($oldTable, $newTable, $backup = null, $prefix = null)
Exception message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
     * NOTE: Choosing to key the result array by a non-unique field name can result in unwanted
     * behavior and should be avoided.
     *
     * @param   string  $key     The name of a field on which to key the result array.
     * @param   string  $column  An optional column name. Instead of the whole row, only this column value will be in
     * the result array.
     *
     * @return  mixed   The return value or null if the query failed.
     *
     * @since   1.7.0
     * @throws  RuntimeException
     */
    public function loadAssocList($key = null, $column = null)
    {
        $this->connect();
 
        $array = array();
 
        // Execute the query and get the result set cursor.
        if (!($cursor = $this->execute()))
        {
            return;
        }
 
        // Get all of the rows from the result set.
        while ($row = $this->fetchAssoc($cursor))
        {
            $value = ($column) ? (isset($row[$column]) ? $row[$column] : $row) : $row;
 
            if ($key)
            {
                $array[$row[$key]] = $value;
            }
            else
            {
                $array[] = $value;
            }
        }
 
        // Free up system resources and return.
            WHERE 
                $key = '$value'
        ";
        $db->setQuery($sql);
        $result = $db->loadAssoc();
        return $result;
    }
    public static function authorGetProfileDetails($user_id) {
        $db = JFactory::getDbo();
        $sql = "
            SELECT 
                SUBSTRING_INDEX(user_profiles.profile_key, '.', -1) as `key`,
                user_profiles.profile_value as `value`
            FROM
                joom_user_profiles user_profiles
            WHERE 
                user_id = $user_id
        ";
        $db->setQuery($sql);
        $result = $db->loadAssocList();
        $profile_details = [];
        foreach($result as $item){
            $profile_details[$item['key']] = trim($item['value'], '"');
        }
        return $profile_details;
    }
    
    public static function authorSaveBegin($author_name) {
        JLoader::register('IlimhaneModelTag', JPATH_ROOT . '/components/com_ilimhane/models/Tag.php');
        $Tag = new IlimhaneModelTag();
        $tag = $Tag->tagGet($author_name);
        $author_object = [
            'user_id' => false,
            'tag_id' => $tag['id'],
            'params' => '{}'
        ];
        return self::authorSave($author_object);
    }
    
    public static function authorSave($author_object) {
 
<?php
 
class IlimhaneModelAuthor extends JModelLegacy
{
    
    private static $author_image_placeholder_path = '/images/ilimhane/header/';
    
    public static function authorComposeByFilter($value, $key) {
        $author = self::authorGetByFilter($value, $key);
        if($author['avatar'] == ""){
            $author['avatar'] = self::$author_image_placeholder_path.mt_rand(1,3).'.jpg';
        }
        if($author['background_image'] == ""){
            $author['background_image'] = self::$author_image_placeholder_path.mt_rand(1,3).'.jpg';
        }
        $author = array_merge($author, self::authorGetProfileDetails($author['id']));
        $author['description'] = json_decode('{"decoded":"'.$author['aboutme'].'"}', true)['decoded'];
        return $author;
    }
    
    public static function authorGetByFilter($value, $key) {
        $db = JFactory::getDbo();
        $sql = "
            SELECT 
                user.id,
                user.name as title, 
                user.params, 
                user_dashboard.avatar_link as avatar,
                user_dashboard.background_link as background_image
            FROM
                joom_users user
                LEFT JOIN
                joom_user_dashboard user_dashboard ON user.id = user_dashboard.user_id
            WHERE 
                $key = '$value'
        ";
        $db->setQuery($sql);
        $result = $db->loadAssoc();
        return $result;
            $ilimhane['header_class'] = 'personilized';
            if(!empty($ilimhane['header_data']['id'])){
                $ilimhane['header_data']['hall_of_fame'] = $Category->categoryComposeHallOfFame($ilimhane['header_data']['id']);
            }
        } else
        if(!empty($ilimhane['author_name'])){
            $associated_title = $Tag->tagAssociationGet($ilimhane['author_name']);
            if(!empty($associated_title)){
                $parameters_string = str_replace(explode('&au=', JUri::getInstance()->getQuery())[1], $associated_title, JUri::getInstance()->getQuery());
                $Application->redirect(JUri::getInstance()->getPath().'?'.$parameters_string);
            }
            $ilimhane['layout'] = 'author';
            $ilimhane['column'] = 'author';
            $ilimhane['link'] = '?'.'&au='.$ilimhane[$ilimhane['layout'].'_name'];
            $document->setTitle($ilimhane['author_name'].' - '.JText::_('MOD_ILIMHANE_DOC_TITLE_'.mb_strtoupper($ilimhane['item_type']).'_PREFIX'));
            $document->addCustomTag('<meta property="og:title" content="'.$ilimhane['author_name'].'"/>');
            $document->addCustomTag('<meta class="og-description" property="og:description" content="'.$ilimhane['author_name'].'"/>');
            $document->addCustomTag('<meta property="og:site_name" content="'.$ilimhane['author_name'].'"/>');
            $ilimhane['article_list'] = $Item->itemListGet($ilimhane[$ilimhane['layout'].'_name'], $ilimhane['column'], $ilimhane['limit'], $ilimhane['offset'], $ilimhane['item_type']); 
            $ilimhane['header_data'] = $Author->authorComposeByFilter($ilimhane['author_name'], 'name');
            $ilimhane['header_class'] = 'personilized';
        } else
        if(!empty($ilimhane['tag_name'])){
            $associated_title = $Tag->tagAssociationGet($ilimhane['tag_name']);
            if(!empty($associated_title)){
                $parameters_string = str_replace(explode('&t=', JUri::getInstance()->getQuery())[1], $associated_title, JUri::getInstance()->getQuery());
                $Application->redirect(JUri::getInstance()->getPath().'?'.$parameters_string);
            }
            $ilimhane['layout'] = 'tag';
            $ilimhane['column'] = 'tag';
            $ilimhane['link'] = '?'.'&t='.$ilimhane[$ilimhane['layout'].'_name'];
            $document->setTitle($ilimhane['tag_name'].' - '.JText::_('MOD_ILIMHANE_DOC_TITLE_'.mb_strtoupper($ilimhane['item_type']).'_PREFIX'));
            $document->addCustomTag('<meta property="og:title" content="'.$ilimhane['tag_name'].'"/>');
            $document->addCustomTag('<meta class="og-description" property="og:description" content="'.$ilimhane['tag_name'].'"/>');
            $document->addCustomTag('<meta property="og:site_name" content="'.$ilimhane['tag_name'].'"/>');
            $ilimhane['article_list'] = $Item->itemListGet($ilimhane[$ilimhane['layout'].'_name'], $ilimhane['column'], $ilimhane['limit'], $ilimhane['offset'], $ilimhane['item_type']); 
            $ilimhane['header_class'] = 'personilized';
        } else {
            $ilimhane['layout'] = 'all';
            $ilimhane['column'] = 'all';
        if (file_exists($path))
        {
            $lang = \JFactory::getLanguage();
 
            $coreLanguageDirectory      = JPATH_BASE;
            $extensionLanguageDirectory = dirname($path);
 
            $langPaths = $lang->getPaths();
 
            // Only load the module's language file if it hasn't been already
            if (!$langPaths || (!isset($langPaths[$coreLanguageDirectory]) && !isset($langPaths[$extensionLanguageDirectory])))
            {
                // 1.5 or Core then 1.6 3PD
                $lang->load($module->module, $coreLanguageDirectory, null, false, true) ||
                    $lang->load($module->module, $extensionLanguageDirectory, null, false, true);
            }
 
            $content = '';
            ob_start();
            include $path;
            $module->content = ob_get_contents() . $content;
            ob_end_clean();
        }
 
        // Load the module chrome functions
        if (!$chrome)
        {
            $chrome = array();
        }
 
        include_once JPATH_THEMES . '/system/html/modules.php';
        $chromePath = JPATH_THEMES . '/' . $template . '/html/modules.php';
 
        if (!isset($chrome[$chromePath]))
        {
            if (file_exists($chromePath))
            {
                include_once $chromePath;
            }
 
            $module = clone $module;
            $module->params = (string) $params;
        }
 
        // Default for compatibility purposes. Set cachemode parameter or use JModuleHelper::moduleCache from within the module instead
        $cachemode = $params->get('cachemode', 'oldstatic');
 
        if ($params->get('cache', 0) == 1 && \JFactory::getConfig()->get('caching') >= 1 && $cachemode != 'id' && $cachemode != 'safeuri')
        {
            // Default to itemid creating method and workarounds on
            $cacheparams = new \stdClass;
            $cacheparams->cachemode = $cachemode;
            $cacheparams->class = 'JModuleHelper';
            $cacheparams->method = 'renderModule';
            $cacheparams->methodparams = array($module, $attribs);
 
            return ModuleHelper::ModuleCache($module, $params, $cacheparams);
        }
 
        return ModuleHelper::renderModule($module, $attribs);
    }
}
 
    public function displayModule($id, $attribs = [])
    {
        $document = \JFactory::getDocument();
        if (!$document instanceof \JDocumentHTML) {
            return '';
        }
 
        $module = is_object($id) ? $id : $this->getModule($id);
 
        // Make sure that module really exists.
        if (!is_object($module)) {
            return '';
        }
 
        $isGantry = \strpos($module->module, 'gantry5') !== false;
        $content = isset($module->content) ? $module->content : null;
 
        $renderer = $document->loadRenderer('module');
 
        $html = trim($renderer->render($module, $attribs));
 
        // Add frontend editing feature as it has only been defined for module positions.
        $app = \JFactory::getApplication();
        $user = \JFactory::getUser();
 
        $frontEditing = ($app->isSite() && $app->get('frontediting', 1) && !$user->guest);
        $menusEditing = ($app->get('frontediting', 1) == 2) && $user->authorise('core.edit', 'com_menus');
 
        if (!$isGantry && $frontEditing && $html && $user->authorise('module.edit.frontend', 'com_modules.module.' . $module->id)) {
            $displayData = [
                'moduleHtml' => &$html,
                'module' => $module,
                'position' => isset($attribs['position']) ? $attribs['position'] : $module->position,
                'menusediting' => $menusEditing
            ];
            \JLayoutHelper::render('joomla.edit.frontediting_modules', $displayData);
        }
 
        // Work around Joomla "issue" which corrupts content of custom html module (last checked J! 3.6.5).
        $module->content = $content;
            }
 
            throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
            $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            if (!$arguments) {
                $ret = $object->$method();
            } else {
                $ret = \call_user_func_array([$object, $method], $arguments);
            }
        } catch (\BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        // @deprecated in 1.28
        if ($object instanceof \Twig_TemplateInterface) {
            $self = $object->getTemplateName() === $this->getTemplateName();
            $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
            if ('renderBlock' === $method || 'displayBlock' === $method) {
                $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('hasBlock' === $method) {
                $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('render' === $method || 'display' === $method) {
                $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
            }
            @trigger_error($message, E_USER_DEPRECATED);
            }
 
            throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
            $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            if (!$arguments) {
                $ret = $object->$method();
            } else {
                $ret = \call_user_func_array([$object, $method], $arguments);
            }
        } catch (\BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        // @deprecated in 1.28
        if ($object instanceof \Twig_TemplateInterface) {
            $self = $object->getTemplateName() === $this->getTemplateName();
            $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
            if ('renderBlock' === $method || 'displayBlock' === $method) {
                $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('hasBlock' === $method) {
                $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('render' === $method || 'display' === $method) {
                $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
            }
            @trigger_error($message, E_USER_DEPRECATED);
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/partials/particle.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/module.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_particle($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "displayModule", [0 => $this->getAttribute(($context["particle"] ?? null), "module_id", []), 1 => ["style" => (($this->getAttribute(($context["particle"] ?? null), "chrome", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "chrome", []), "gantry")) : ("gantry")), "position" => "particle"]], "method");
        echo "
";
    }
 
    public function getTemplateName()
    {
        return "@particles/module.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
    }
 
    public function getDebugInfo()
    {
        return array (  42 => 4,  39 => 3,  29 => 1,);
    }
 
    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
        $assetFunction($content, $location, $priority);
        // line 9
        $assetFunction = $this->env->getFunction('parse_assets')->getCallable();
        $assetVariables = [];
        if ($assetVariables && !is_array($assetVariables)) {
            throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
        }
        $location = "footer";
        if ($location && !is_string($location)) {
            throw new UnexpectedValueException('{% scripts in x %}: x is not a string');
        }
        $priority = isset($assetVariables['priority']) ? $assetVariables['priority'] : 0;
        ob_start();
        // line 10
        echo "    ";
        $this->displayBlock('javascript_footer', $context, $blocks);
        $content = ob_get_clean();
        $assetFunction($content, $location, $priority);
        // line 14
        $this->displayBlock('particle', $context, $blocks);
    }
 
    // line 2
    public function block_stylesheets($context, array $blocks = [])
    {
        // line 3
        echo "    ";
    }
 
    // line 5
    public function block_javascript($context, array $blocks = [])
    {
        // line 6
        echo "    ";
    }
 
    // line 10
    public function block_javascript_footer($context, array $blocks = [])
    {
        // line 11
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'particle' => [$this, 'block_particle'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/partials/particle.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/module.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_particle($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "displayModule", [0 => $this->getAttribute(($context["particle"] ?? null), "module_id", []), 1 => ["style" => (($this->getAttribute(($context["particle"] ?? null), "chrome", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "chrome", []), "gantry")) : ("gantry")), "position" => "particle"]], "method");
        echo "
";
    }
 
    public function getTemplateName()
    {
        return "@particles/module.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                echo "        ";
                $context["enabled"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("particles." . $this->getAttribute(($context["segment"] ?? null), "type", [])) . ".enabled"), 1 => 1], "method");
                // line 4
                echo "        ";
                $context["particle"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "getJoined", [0 => ("particles." . $this->getAttribute(($context["segment"] ?? null), "type", [])), 1 => $this->getAttribute(($context["segment"] ?? null), "attributes", [])], "method");
                // line 5
                echo "    ";
            }
            // line 6
            echo "
    ";
            // line 7
            ob_start();
            // line 8
            echo "        ";
            if ((($context["enabled"] ?? null) && ((null === $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])) || $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])))) {
                // line 9
                echo "            ";
                $this->loadTemplate([0 => (("particles/" . (($this->getAttribute(($context["segment"] ?? null), "subtype", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["segment"] ?? null), "subtype", []), "position")) : ("position"))) . ".html.twig"), 1 => (("@particles/" . (($this->getAttribute(                // line 10
($context["segment"] ?? null), "subtype", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["segment"] ?? null), "subtype", []), "position")) : ("position"))) . ".html.twig")], "@nucleus/content/position.html.twig", 9)->display($context);
                // line 11
                echo "        ";
            }
            // line 12
            echo "    ";
            $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
            // line 14
            if (twig_trim_filter(($context["html"] ?? null))) {
                // line 15
                echo "        ";
                if (($this->getAttribute(($context["gantry"] ?? null), "debug", []) && $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "key", []))) {
                    echo "<!-- START POSITION ";
                    echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "key", []), "html", null, true);
                    echo " -->";
                }
                // line 16
                echo "
        <div class=\"g-content";
                // line 17
                (($this->getAttribute(($context["segment"] ?? null), "classes", [])) ? (print (twig_escape_filter($this->env, (" " . twig_escape_filter($this->env, twig_join_filter($this->getAttribute(($context["segment"] ?? null), "classes", []), " "))), "html", null, true))) : (print ("")));
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = [])
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = [])
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
 
            $this->renderer = $this->extendTwig($twig, $loader);
        }
 
        return $this->renderer;
    }
 
    /**
     * Render a template file by using given context.
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $this->renderer()->render($file, $context);
    }
 
    /**
     * Compile and render twig string.
     *
     * @param string $string
     * @param array $context
     * @return string
     */
    public function compile($string, array $context = [])
    {
        $renderer = $this->renderer();
        $template = $renderer->createTemplate($string);
 
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $template->render($context);
    }
 
 
            $filename = $locator->findResource("gantry-cache://theme/html/{$key}.php", true, true);
            $file = PhpFile::instance($filename);
            if ($file->exists()) {
                try {
                    return ContentBlock::fromArray((array) $file->content());
                } catch (\Exception $e) {
                    // Invalid cache, continue to rendering.
                    GANTRY_DEBUGGER && \Gantry\Debugger::addMessage(sprintf('Failed to load %s %s cache', $item->type, $item->id), 'debug');
                }
            }
        }
 
        // Create new document context for assets.
        $context = $this->getContext(['segment' => $item, 'enabled' => 1, 'particle' => $particle] + $options);
 
        /** @var Document $document */
        $document = $gantry['document'];
        $document->push();
        $html = trim($this->render("@nucleus/content/{$item->type}.html.twig", $context));
        $content = $document->pop()->setContent($html);
 
        if (isset($file)) {
            // Save HTML and assets into the cache.
            GANTRY_DEBUGGER && \Gantry\Debugger::addMessage(sprintf('Caching %s %s', $item->type, $item->id), 'debug');
            $file->save($content->toArray());
        }
 
        return $content;
    }
}
 
                        }
                    }
            }
        }
    }
 
    /**
     * Renders individual content block, like particle or position.
     *
     * Function is used to pre-render content.
     *
     * @param object|array $item
     * @param array $options
     * @return string|null
     */
    public function renderContent($item, $options = [])
    {
        $gantry = static::gantry();
 
        $content = $this->getContent($item, $options);
 
        /** @var Document $document */
        $document = $gantry['document'];
        $document->addBlock($content);
 
        $html = $content->toString();
        return !strstr($html, '@@DEFERRED@@') ? $html : null;
    }
 
    /**
     * Renders individual content block, like particle or position.
     *
     * Function is used to pre-render content.
     *
     * @param object|array $item
     * @param array $options
     * @return ContentBlock
     * @since 5.4.3
     */
    public function getContent($item, $options = [])
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    GANTRY_DEBUGGER && \Gantry\Debugger::startTimer($item->id, "Rendering {$item->id}");
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer($item->id);
 
                    break;
 
                default:
                    if ($sticky) {
                        $item->attributes->sticky = 1;
                        break;
                    }
 
                    if (empty($item->children)) {
                        unset($items[$i]);
                        break;
                    }
 
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    GANTRY_DEBUGGER && \Gantry\Debugger::startTimer($item->id, "Rendering {$item->id}");
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer($item->id);
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    GANTRY_DEBUGGER && \Gantry\Debugger::startTimer($item->id, "Rendering {$item->id}");
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer($item->id);
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    GANTRY_DEBUGGER && \Gantry\Debugger::startTimer($item->id, "Rendering {$item->id}");
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer($item->id);
                }
            }
 
            GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer('atoms');
        }
    }
 
    /**
     * Returns all non-empty segments from the layout.
     *
     * @return array
     */
    public function segments()
    {
        if (!isset($this->segments)) {
            $this->segments = $this->loadLayout()->toArray();
 
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('segments', "Preparing layout");
 
            $this->prepareLayout($this->segments);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer('segments');
        }
 
        return $this->segments;
    }
 
    /**
     * Prepare layout for rendering. Initializes all CSS/JS in particles.
     */
    public function prepare()
    {
        $this->segments();
    }
 
    /**
     * Returns details of the theme.
     *
     * @return ThemeDetails
     */
            if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
                return;
            }
 
            throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
            $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            if (!$arguments) {
                $ret = $object->$method();
            } else {
                $ret = \call_user_func_array([$object, $method], $arguments);
            }
        } catch (\BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        // @deprecated in 1.28
        if ($object instanceof \Twig_TemplateInterface) {
            $self = $object->getTemplateName() === $this->getTemplateName();
            $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
            if ('renderBlock' === $method || 'displayBlock' === $method) {
                $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('hasBlock' === $method) {
                $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('render' === $method || 'display' === $method) {
                $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
            'page_bottom' => [$this, 'block_page_bottom'],
            'body_top' => [$this, 'block_body_top'],
            'body_bottom' => [$this, 'block_body_bottom'],
            'page_head' => [$this, 'block_page_head'],
            'page_footer' => [$this, 'block_page_footer'],
            'page' => [$this, 'block_page'],
            'page_body' => [$this, 'block_page_body'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", []), "startTimer", [0 => "render", 1 => "Rendering page"], "method");
        // line 2
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "setLayout", [], "method");
        // line 3
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "loadAtoms", [], "method");
        // line 4
        $context["segments"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "segments", [], "method");
        // line 6
        ob_start();
        // line 7
        echo "    ";
        if ($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "hasContent", [], "method")) {
            // line 8
            echo "        ";
            $this->displayBlock('content', $context, $blocks);
            // line 10
            echo "    ";
        }
        $context["content"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 13
        $context["offcanvas"] = null;
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
            if (($this->getAttribute($context["segment"], "type", []) == "offcanvas")) {
                // line 15
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'page_footer' => [$this, 'block_page_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page.html.twig", "partials/page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_page_footer($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        $this->displayParentBlock("page_footer", $context, $blocks);
        echo "
    <jdoc:include type=\"modules\" name=\"debug\" />
";
    }
 
    public function getTemplateName()
    {
        return "partials/page.html.twig";
    }
 
    public function isTraitable()
    {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "partials/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("partials/page.html.twig", "index.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_content($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "displayContent", [0 => ($context["content"] ?? null)], "method");
        echo "
";
    }
 
    public function getTemplateName()
    {
        return "index.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = [])
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = [])
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
 
            $this->renderer = $this->extendTwig($twig, $loader);
        }
 
        return $this->renderer;
    }
 
    /**
     * Render a template file by using given context.
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $this->renderer()->render($file, $context);
    }
 
    /**
     * Compile and render twig string.
     *
     * @param string $string
     * @param array $context
     * @return string
     */
    public function compile($string, array $context = [])
    {
        $renderer = $this->renderer();
        $template = $renderer->createTemplate($string);
 
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $template->render($context);
    }
 
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2017 RocketTheme, LLC
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */
 
defined('_JEXEC') or die;
 
// Bootstrap Gantry framework or fail gracefully (inside included file).
$gantry = include __DIR__ . '/includes/gantry.php';
 
/** @var \Gantry\Framework\Theme $theme */
$theme = $gantry['theme'];
 
// All the custom twig variables can be defined in here:
$context = array();
 
// Render the page.
echo $theme->render('index.html.twig', $context);
 
     * @param   string  $directory  The name of the template
     * @param   string  $filename   The actual filename
     *
     * @return  string  The contents of the template
     *
     * @since   1.7.0
     */
    protected function _loadTemplate($directory, $filename)
    {
        $contents = '';
 
        // Check to see if we have a valid template file
        if (file_exists($directory . '/' . $filename))
        {
            // Store the file path
            $this->_file = $directory . '/' . $filename;
 
            // Get the file content
            ob_start();
            require $directory . '/' . $filename;
            $contents = ob_get_contents();
            ob_end_clean();
        }
 
        // Try to find a favicon by checking the template and root folder
        $icon = '/favicon.ico';
 
        foreach (array($directory, JPATH_BASE) as $dir)
        {
            if (file_exists($dir . $icon))
            {
                $path = str_replace(JPATH_BASE, '', $dir);
                $path = str_replace('\\', '/', $path);
                $this->addFavicon(Uri::base(true) . $path . $icon);
                break;
            }
        }
 
        return $contents;
    }
 
        if (!file_exists($directory . '/' . $template . '/' . $file))
        {
            $file = 'index.php';
        }
 
        // Load the language file for the template
        $lang = \JFactory::getLanguage();
 
        // 1.5 or core then 1.6
        $lang->load('tpl_' . $template, JPATH_BASE, null, false, true)
            || $lang->load('tpl_' . $template, $directory . '/' . $template, null, false, true);
 
        // Assign the variables
        $this->template = $template;
        $this->baseurl = Uri::base(true);
        $this->params = isset($params['params']) ? $params['params'] : new Registry;
 
        // Load
        $this->_template = $this->_loadTemplate($directory . '/' . $template, $file);
 
        return $this;
    }
 
    /**
     * Parse a document template
     *
     * @return  HtmlDocument  instance of $this to allow chaining
     *
     * @since   1.7.0
     */
    protected function _parseTemplate()
    {
        $matches = array();
 
        if (preg_match_all('#<jdoc:include\ type="([^"]+)"(.*)\/>#iU', $this->_template, $matches))
        {
            $template_tags_first = array();
            $template_tags_last = array();
 
            $options['title'] = (isset($args[3])) ? $args[3] : null;
        }
 
        parent::$_buffer[$options['type']][$options['name']][$options['title']] = $content;
 
        return $this;
    }
 
    /**
     * Parses the template and populates the buffer
     *
     * @param   array  $params  Parameters for fetching the template
     *
     * @return  HtmlDocument instance of $this to allow chaining
     *
     * @since   1.7.0
     */
    public function parse($params = array())
    {
        return $this->_fetchTemplate($params)->_parseTemplate();
    }
 
    /**
     * Outputs the template to the browser.
     *
     * @param   boolean  $caching  If true, cache the output
     * @param   array    $params   Associative array of attributes
     *
     * @return  string The rendered data
     *
     * @since   1.7.0
     */
    public function render($caching = false, $params = array())
    {
        $this->_caching = $caching;
 
        if (empty($this->_template))
        {
            $this->parse($params);
        }
     */
    protected function render()
    {
        // Setup the document options.
        $this->docOptions['template'] = $this->get('theme');
        $this->docOptions['file']     = $this->get('themeFile', 'index.php');
        $this->docOptions['params']   = $this->get('themeParams');
 
        if ($this->get('themes.base'))
        {
            $this->docOptions['directory'] = $this->get('themes.base');
        }
        // Fall back to constants.
        else
        {
            $this->docOptions['directory'] = defined('JPATH_THEMES') ? JPATH_THEMES : (defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
        }
 
        // Parse the document.
        $this->document->parse($this->docOptions);
 
        // Trigger the onBeforeRender event.
        \JPluginHelper::importPlugin('system');
        $this->triggerEvent('onBeforeRender');
 
        $caching = false;
 
        if ($this->isClient('site') && $this->get('caching') && $this->get('caching', 2) == 2 && !\JFactory::getUser()->get('id'))
        {
            $caching = true;
        }
 
        // Render the document.
        $data = $this->document->render($caching, $this->docOptions);
 
        // Set the application output data.
        $this->setBody($data);
 
        // Trigger the onAfterRender event.
        $this->triggerEvent('onAfterRender');
                    $this->setUserState('users.login.form.data', array('return' => \JUri::getInstance()->toString()));
                    $this->set('themeFile', 'offline.php');
                    $this->setHeader('Status', '503 Service Temporarily Unavailable', 'true');
                }
 
                if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline'))
                {
                    $this->set('themeFile', 'component.php');
                }
 
                // Ensure themeFile is set by now
                if ($this->get('themeFile') == '')
                {
                    $this->set('themeFile', $file . '.php');
                }
 
                break;
        }
 
        parent::render();
    }
 
    /**
     * Route the application.
     *
     * Routing is the process of examining the request environment to determine which
     * component should receive the request. The component optional parameters
     * are then set in the request object to be processed when the application is being
     * dispatched.
     *
     * @return  void
     *
     * @since   3.2
     */
    protected function route()
    {
        // Execute the parent method
        parent::route();
 
        $Itemid = $this->input->getInt('Itemid', null);
        }
    }
 
    /**
     * Execute the application.
     *
     * @return  void
     *
     * @since   3.2
     */
    public function execute()
    {
        // Perform application routines.
        $this->doExecute();
 
        // If we have an application document object, render it.
        if ($this->document instanceof \JDocument)
        {
            // Render the application output.
            $this->render();
        }
 
        // If gzip compression is enabled in configuration and the server is compliant, compress the output.
        if ($this->get('gzip') && !ini_get('zlib.output_compression') && ini_get('output_handler') !== 'ob_gzhandler')
        {
            $this->compress();
 
            // Trigger the onAfterCompress event.
            $this->triggerEvent('onAfterCompress');
        }
 
        // Send the application response.
        $this->respond();
 
        // Trigger the onAfterRespond event.
        $this->triggerEvent('onAfterRespond');
    }
 
    /**
     * Check if the user is required to reset their password.
    include_once __DIR__ . '/defines.php';
}
 
if (!defined('_JDEFINES'))
{
    define('JPATH_BASE', __DIR__);
    require_once JPATH_BASE . '/includes/defines.php';
}
 
require_once JPATH_BASE . '/includes/framework.php';
 
// Set profiler start time and memory usage and mark afterLoad in the profiler.
JDEBUG ? JProfiler::getInstance('Application')->setStart($startTime, $startMem)->mark('afterLoad') : null;
 
// Instantiate the application.
$app = JFactory::getApplication('site');
 
// Execute the application.
 
$app->execute();
 
 

Environment & details:

Key Value
au Diyar
empty
empty
empty
empty
Key Value
REDIRECT_UNIQUE_ID ZgbRVwFBqgXBFr05AjyIpAAAAAc
REDIRECT_MMDB_ADDR 34.201.8.144
REDIRECT_GEOIP_ADDR 34.201.8.144
REDIRECT_MMDB_INFO result found
REDIRECT_GEOIP_COUNTRY_NAME United States
REDIRECT_GEOIP_REGION VA
REDIRECT_GEOIP_CITY Ashburn
REDIRECT_GEOIP_LONGITUDE -77.47280
REDIRECT_GEOIP_CONTINENT_CODE NA
REDIRECT_GEOIP_LATITUDE 39.04810
REDIRECT_GEOIP_POSTAL_CODE 20149
REDIRECT_GEOIP_COUNTRY_CODE US
REDIRECT_HTTPS on
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_PERL_USE_UNSAFE_INC 1
REDIRECT_STATUS 200
UNIQUE_ID ZgbRVwFBqgXBFr05AjyIpAAAAAc
MMDB_ADDR 34.201.8.144
GEOIP_ADDR 34.201.8.144
MMDB_INFO result found
GEOIP_COUNTRY_NAME United States
GEOIP_REGION VA
GEOIP_CITY Ashburn
GEOIP_LONGITUDE -77.47280
GEOIP_CONTINENT_CODE NA
GEOIP_LATITUDE 39.04810
GEOIP_POSTAL_CODE 20149
GEOIP_COUNTRY_CODE US
HTTPS on
HTTP_AUTHORIZATION
PERL_USE_UNSAFE_INC 1
HTTP_HOST diyar.im
HTTP_X_SERVER_ADDR 45.130.41.184
HTTP_X_FORWARDED_PROTO https
HTTP_X_REAL_IP 34.201.8.144
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE <address>Apache/2.4.55 (Unix) Server at diyar.im Port 80</address>
SERVER_SOFTWARE Apache/2.4.55 (Unix)
SERVER_NAME diyar.im
SERVER_ADDR 45.130.41.184
SERVER_PORT 443
REQUEST_SCHEME https
REMOTE_ADDR 34.201.8.144
DOCUMENT_ROOT /home/b/baycik/diyar.im/public_html
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /home/b/baycik/diyar.im/public_html
SERVER_ADMIN webmaster@diyar.im
SCRIPT_FILENAME /home/b/baycik/diyar.im/public_html/index.php
REMOTE_PORT 6089
REDIRECT_URL /knowledge-base
REDIRECT_QUERY_STRING au=Diyar
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING au=Diyar
REQUEST_URI /knowledge-base?au=Diyar
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711722839.6866
REQUEST_TIME 1711722839
argv Array ( [0] => au=Diyar )
argc 1
Key Value
APT_GET_UPGRADE apt-get dist-upgrade -qq -y
HOSTNAME narnia.beget.ru
OLDPWD /
APT_GET_INSTALL apt-get install --no-install-recommends -qq -y
IN_CONTAINER true
PWD /
HOME /root
DEBIAN_FRONTEND noninteractive
SHLVL 0
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
APT_GET_UPDATE apt-get update -qq
0. Whoops\Handler\PrettyPageHandler