Jump to content

Submenu find returns no results in other language


BFD Calendar
 Share

Recommended Posts

I have a submenu to show only students from specific programmes on a general list of students. The submenu works and shows up in English and translates into Dutch when I switch languages. But when I choose a subcategory it only shows the list in English, not when I switch to Dutch.

This is the submenu code:

	$programpage = $pages->get("/students/programmes/"); 
	$children = $programpage->children;
		
	foreach($children as $child) {
	$class = $page === $child || $child->children->has($page) ? " class='on'" : '';
	echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>";
	};

Here I make the list for the programmes:

	$features = $pages->find("template=students, stu_programme=$page->title, sort=title");

'stu_programme' is a page field and the pages all have titles in English and Dutch.

URL 'mekano/en/students/programmes/bachelor-of-architecture/' finds the list of Bachelor students, while URL 'mekano/nl/studenten/programmas/bachelor-architectuur/' finds nothing...

Where am I going wrong?

Link to comment
Share on other sites

The menu part works fine, it shows the titles of the programmes in English and Dutch when switching languages.

For some reason the "$features = $pages->find("template=students, stu_programme=$page->title, sort=title");" doesn't match the Dutch page title in the URL to the Dutch title of the 'programmes' pages, like it does for English.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...