#1 2016-07-27 20:00:16

fips
Member
Registered: 2014-08-08
Posts: 8

How to remove lang from a specific url?

Hey Guys,

I have in my navigation a menu link which lead to a subsite.
Example: www.mywebsite.org/blog
The link it self works, but as soon as I click somewhere on that "blog" subsite it lead me to:
www.mywebsite/rus/blog/text123

How can I remove that /lang/ from all Url with blog inside?
I saw something with the attribute "ignore_current="true"", but how should I implement it in the navigation without destroying the other menu links?

Thanks in advanced

Steve

Offline

#2 2016-07-28 05:22:25

adaliszk
Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397
Website

Re: How to remove lang from a specific url?

In the settings uncheck the force language in url, I do not remember that is in the Ionize settings or in the languages. If your links are from the system and it is the default then it should work. Can you share the code where your view making the link?


Webdeveloper, Programmer, Application developer, Ionize friend
@adaliszk

Offline

#3 2016-07-28 11:50:48

fips
Member
Registered: 2014-08-08
Posts: 8

Re: How to remove lang from a specific url?

force language in urls was unchecked.

here the code which add the navigation:
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-responsive-collapse">
<ion:tree_navigation active_class="dropdown active" tag="ul" class="nav navbar-nav navbar-right" />
</div><!-- /navbar-collapse -->


But I dont want to change the general setting of languages.
Its just about a specific url with the word blog inside.
Can't I solve it through htaccess?

Offline

#4 2016-07-28 14:40:14

adaliszk
Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397
Website

Re: How to remove lang from a specific url?

You can change the behavior of the tree_navigation with adding a helper/navigation_helper.php in your theme, you can copy the contents of the application/helpers/navigation_helper.php and you can change the functions in that way what you want. It's strange that with force url disabled the url has the language code in it, I will check it later whats going on there.

Be aware!

The urls without language code only working with the default language.


Webdeveloper, Programmer, Application developer, Ionize friend
@adaliszk

Offline

#5 2016-08-01 14:03:46

fips
Member
Registered: 2014-08-08
Posts: 8

Re: How to remove lang from a specific url?

Strange, if I type the link : http://www.example.org/blog/text123 in my browser.
It lead me with an 301 to http://www.example.org/rus/blog/text123
All without using ionize.

force language is still unchecked.

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