0

I have a Banner View block that appears on pages using a reference url field.

When the url: thispage is entered in the reference field of the banner, it appears on domain.com/thispage.

Now that i enabled 2 other languages en + de this reference is not working. Entering the url with the language extension (en/thispage) neither.

I looked into the Views Block. Maybe some code needs to be added. The block has this code under Visibility settings:

<?php $nids=arg(1); $datas=node_load($nids); if ( $datas->type=='referenced' ) { return false; } else{ return true; } ?>

In the View under contextual filter there is some global php. This might be changed to match the path from other languages (de/thispage)

This is the code from Views:

$match_path = ltrim($_SERVER['REQUEST_URI'], '/');

$match_path=explode("/",$match_path); $match_path=explode("?",$match_path[0]); return $match_path[0]; //return $_GET['q'];

Any suggestions about how to resolve this?

0

You may want to check your configuration at Configuration -> Languages -> detection and selection: the order specified there could be what explains the current behaviour in your site.

You'd have to experiment a bit with what the exact order in your case should be. In my experience, I often get these kind of issues to work by using an order like 'URL, Default, User', and not something like 'Default, URL, User'. So try to experiment a bit with the various combinations in this order to see if it helps.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.