Jump to content

Set Type of title field from PageTitleLanguage to PageTitle per Template ?


Recommended Posts

I made a Newsletter-System for the customer where you can create Newsletters in "different languages", this means at the creation you have multiple checkboxes with the languages where you can check in which language your newsletter should be. After the creation it renders only the checked languages as language tabs for each multilang field you have (including the title field). Now the title field represents the "Filename" of the Newsletter which dont need to be multilang. 


The Problem I encountered:

Let's say I create a new Newsletter called 20160811_testNewsletter only in the german language. Since french is the default language I must fill it out.



After the creation the user only sees the german tabs for each field including the title field. The Problem that the user encounter is, that he can't change the Filename(title) when he makes a mistake and need to change it or when he copies a existing german newsletter where he want to change the filename, because he can only see the German Tab. Since the Filename(title) dosen't have multilang names, it doesn't need to be a multilang field. Now the other problem is that when I can change the fieldtype of title to a normal PageTitle it affects it globally which is not right. There other Custom-Build-Tools in the System where the title field need to be multilang.



I think there are two possible ways:

- Anykind of Hack to allow type changing for fields on Template basis (Perhaps with a hook?).

- A hook which would update the default value of the title field every time with the value of the the other lang tabs, when I change/fill up the other field(german, italian etc... ) and save afterwards. 


Link to comment
Share on other sites

Wouldn't skip this the PageAdd Section? The customer need to define a specific filename(not an auto generated). He also wanted this "pre-selection" of languages and if its a internal newsletter checkbox. So "Name format for children" is possibly not an option. But still thanks for your effort @Robin S.

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

  • Create New...