Jump to content

Set non default language page names not active by default

Recommended Posts

When creating a new page with multilanguage page names, under the Settings tab there is a field for the page name for each language with an "Active" checkbox.

By default the chachbox is checked


How can I set them to be unchecked by default?

I tried to find settings in LanguageSupport and LanguageSupportPageNames modules and in the settings for the languages.

  • Like 1

Share this post

Link to post
Share on other sites

Hi @gebeer!

Did you find a solution to this?

I added the code below before this which seems to work : 

if(!$page->id) $inputfield->checkboxChecked = 0;


Edited by Mats
Possible temp solution
  • Like 1

Share this post

Link to post
Share on other sites
On 4/13/2019 at 3:32 PM, Mats said:

Did you find a solution to this?

No, was not looking further.
If your code can be implemented as a hook, that would be perfect, I guess.

  • Like 1

Share this post

Link to post
Share on other sites

I couldn't find a way to hook into the LanguageSupportPageNames.module.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By cosmicsafari
      Hi all,
      This is more of a general question than a problem per say.
      Anyway I have been using the AssistedURL module for call to action links among other things, on the whole its a great module so shout out to the developers.
      That said I just noticed that if you update a linked PW page's name/url any link field on other pages using AssistedURL don't update automatically.
      If this is a limitation then thats fine just thought I would ask incase there is a setting either at module or sitewide level that I am missing that enables this to happen.
    • By rushy
      I've got off to a bad start trying to install PW on my local offline server, I must be doing something wrong as I have a bit of experience with Wordpress and it's running fine on my server, but I like the look of PW and hope to try it. Anyway I downloaded and unzipped the PW installation, the installation seemed to go right through ok, everything passed on the check lists. I selected the Default profile, and then when I try to click on Admin access or view the site I get "Not Found - The requested URL /processwire-master/about/ was not found on this server. Apache/2.4.10 (Ubuntu) Server at localhost Port 80"   Simply because the /about folder does not exist! It seems the profile has not been installed by the installation process despite everything else being ok? If I type localhost/processwire-master in the browser I get the Minimal Site Profile  "What is ProcessWire?" page but the links work "About" & "Site Map" don't work as the folders are not there. Bit confused as to why this is missing.
      Please put me out of my misery if it's something obvious I am doing / not doing!
      Many thanks - rushy
    • By gebeer
      I know this has been discussed in detail over the years and I read everything I could find about it in the forum. And still, no (straightforward) solution to my scenario.
      My situation:
      I set up a multilingual events directory site were instructors can sign in and manage their events. There is a core content area which is available in 4 languages. Instructors post their personal info and their events in only one language, but field labels need to be multilanguage. Therefore I need multilanguage page names and fields for them, too. The site has been running on Joomla/Seblod for 3 years already.
      I am currently in the process of porting it to PW.
      Once this is done, a skeleton of the site will be rolled out in different EU countries, so instructors in those countries have their own PW install to manage events for their country.
      Of course, the default language needs to be a different one in each country. And this is where my problem lies.
      I have the multilanguage setup with Language Support Page Names module and am working with multi-language fields in a 2.6.23 install.
      In the original project, the default language is English. Now I need to make a copy of the site that has German as default.
      Solutions that I am aware of are:
      1. do a redirect for the default language homepage. For the frontend this is fine except for the /de/ appended to the home page. In the backend, the German users have language German. But German is not the default language. So when a user creates a new event, they will be presented with the German tab open for multi-language fields. When they fill in the title (PageTitleLanguage) and hit save, they get an error "Required value missing" for the title field. Because they only fill in the german title and the default (english) title is still empty, hence the error. So this is actually not a solution.
      2. switch the values for multi-language fields by script (like proposed here) and rename the default's language title to "German" and adjust the URLs in the page names of the home page. While this is doable, it requires quite some effort as I will have to do this for every country.
      In Joomla/Seblod I can just change the default language with one click in the backend. And I am very much missing this feature in PW 
      Finally, my question: Is there any way other than solution 2 to handle the situation? Maybe I missed some new features or maybe someone has come up with a way to truly change the default language programmatically.
      Thanks for reading through all of this. Any help would be very much appreciated.
    • By robrainfall
      I was wondering if there is a way to install processwire without the default pages? I find myself deleting the default fields, templates, etc.
      I remember the on the old versions of modx when installing you would have to option to install with default data or without. What about implementing that?
  • Create New...