#1 2016-05-24 12:14:42

ccmksy
Member
From: Hong Kong
Registered: 2013-11-30
Posts: 48

Hide the default language of one page only.

My client request the default language is chinese for all pages, except BLOG page. He expects  that  the blog page will display english only.

I tried to click offline button in chinese tab in Blog page, but there show errors in tagmanager. Now I solved that and share my solution with everybody :

1. Open /application/libraries/Tagmanager.php
2. find the line 1866 :

            // Each media has its index and the number of displayed media
            $link['index'] = $idx + 1;
            $link['count'] = $count;
            $tag->set('count', $count);
            $tag->set('index', $link['index']);

            // Medias
            $link['medias'] = $link['data']['medias'];
            $tag->set('links', $link);

            foreach($link['data'] as $key => $value)
            {
                    $tag->set($key, $value);
            }

            foreach($link as $key => $value)
            {
                    $tag->set($key, $value);
            }

            $tag->set('url', $link['absolute_url']);

            $str .= $tag->expand();

3. change to become :

        // If no data, don't display.
        if(!empty($link['data'])):
            // Each media has its index and the number of displayed media
            $link['index'] = $idx + 1;
            $link['count'] = $count;
            $tag->set('count', $count);
            $tag->set('index', $link['index']);

            // Medias
            $link['medias'] = $link['data']['medias'];
            $tag->set('links', $link);

            foreach($link['data'] as $key => $value)
            {
                    $tag->set($key, $value);
            }

            foreach($link as $key => $value)
            {
                    $tag->set($key, $value);
            }

            $tag->set('url', $link['absolute_url']);

            $str .= $tag->expand();
        endif;

Last edited by ccmksy (2016-05-24 12:15:47)

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations