Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • orsomannaro Friend
    #200004

    The problem seem to be the same as described here.

    I need to change the default layout, so I want to clone default and work on my own layout.

    l click on Save as Copy and then on Clone it.

    Than I can see the cloned layout files:

    templates/ja_magz/local/etc/layout/my_layout.ini
    templates/ja_magz/local/tpls/my_layout.php

    but in Template Manager I don’t see the cloned layout listed in the Layout combobox.

    Ninja Lead Moderator
    #543561

    You can fix the problem in JAT3 framework with my solution below

    Open plugins/system/t3/includes/depend/t3filelist.php file

    Change

    protected function getOptions()
    {
    // update path to this template
    $path = (string) $this->element['directory'];
    if (!is_dir($path)) {
    $this->directory = $this->element['directory'] = T3_TEMPLATE_PATH . DIRECTORY_SEPARATOR . $path;
    }

    return parent::getOptions();
    }

    To


    protected function getOptions()
    {
    // update path to this template
    $path = (string) $this->element['directory'];
    $options = array();
    if (!is_dir($path)) {
    // get files in template path
    $this->directory = $this->element['directory'] = T3_TEMPLATE_PATH . DIRECTORY_SEPARATOR . $path;
    $options = parent::getOptions();
    // get files in template local path

    if (!defined('T3_LOCAL_DISABLED') && is_dir (T3_LOCAL_PATH . DIRECTORY_SEPARATOR . $path)) {
    $this->directory = $this->element['directory'] = T3_LOCAL_PATH . DIRECTORY_SEPARATOR . $path;
    $options2 = parent::getOptions();
    foreach ($options2 as $option) {
    $option->text .= ' (local)';
    $options[] = $option;
    }
    }
    }
    return $options;
    }

    Let me know if it helps

    orsomannaro Friend
    #543900

    <em>@Ninja Lead 438323 wrote:</em><blockquote>Let me know if it helps</blockquote>

    Yes Ninja, It seems to work great.

    Thank a lot!

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  orsomannaro 10 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum