Fokke Posted May 8, 2013 Share Posted May 8, 2013 Hi everyone! My first post here. Long time reader though I'm using the latest dev build, and I have set up a small site with two languages: english (default) and finnish. Everything is running nice and having multi-language page names and fields is a real time saver. But... I have set up a repeater field called timeline, with one field (for now) attached to it. Field is called "title" and it's type is textlanguage. I created couple of rows into repeater and filled title for both languages. If I try to loop all rows using foreach, the english titles appear with no problem, but finnish titles are missing. echo 'rows: ' . count($page->timeline); The following line returns 4 in the english version of the site, but 0 in finnish. Am I missing something here? Link to comment Share on other sites More sharing options...
diogo Posted May 8, 2013 Share Posted May 8, 2013 Welcome to the Forum Fokke. The default language for the user (english) is being called, to echo the finnish version of those fields you will have to, either change the user language before $user->language = $languages->get("french"), or call the finnish fields directly echo $page->fieldname_finnish Did you see this page? http://processwire.com/api/multi-language-support/multi-language-fields/ Sorry, if I'm assuming that you are doing everything wrong with my answer, but we have to start asking for the basic problems 1 Link to comment Share on other sites More sharing options...
Fokke Posted May 10, 2013 Author Share Posted May 10, 2013 Hello Diogo! Yes I have done this, all multilingual fields are now working properly, except the repeater. Since I've got a little rush with this site, I'm going to use pages for those timeline blocks and try to figure out this repeater problem later. Sorry for bothering you. I'll be back when I get this fixed : ) Link to comment Share on other sites More sharing options...
Soma Posted May 10, 2013 Share Posted May 10, 2013 Works fine in repeaters for language fields. Any more infos to help reproduce this? Link to comment Share on other sites More sharing options...
horst Posted May 14, 2013 Share Posted May 14, 2013 (edited) ... Field is called "title" ... maybe it is a stupid question and it can be done with PW without worries, but I want to ask: can we call a field title, because every page/field in PW has already a title? (I've thought title is the only mandatory field for all pages in PW) EDIT: have just tried it and when save the new field I got: Field may not be named 'title' because it is already used by another field As I have tried this with a singular language page and a simple Textfield, this may be other when trying to create a multilanguage text field. Maybe one DB-Table could be created and the other one not, - but the Errormessage wasn't shown to the user. Just a thought, I'm PW-Newbie EDIT2: No, also with a multi language site I cannot save a field named title Edited May 14, 2013 by horst Link to comment Share on other sites More sharing options...
Soma Posted May 14, 2013 Share Posted May 14, 2013 Only mandatory field is name. Title can be removed. Hint globall settings. Link to comment Share on other sites More sharing options...
kongondo Posted May 14, 2013 Share Posted May 14, 2013 (edited) Only mandatory field is name. Title can be removed. Hint globall settings. This confuses me. I too always thought that Title is a mandatory field and that Name, although mandatory IS NOT a field? Looking at the PW db, i don't see Name as a field but as a column in the pages table. Edit: OK, now I get the global settings bit...but, is Name considered a field? Edited May 14, 2013 by kongondo Link to comment Share on other sites More sharing options...
Soma Posted May 14, 2013 Share Posted May 14, 2013 Yeah its an input(field). Sorry to confuz you. ;-) Theres even an FieldtypePageName and InputfieldPageName. (A db field isnt also a field?) 1 Link to comment Share on other sites More sharing options...
kongondo Posted May 14, 2013 Share Posted May 14, 2013 OK, thanks for the clarification. So it is correct to say that Title is a custom field type and Name is a system field type? Link to comment Share on other sites More sharing options...
apeisa Posted May 14, 2013 Share Posted May 14, 2013 OK, thanks for the clarification. So it is correct to say that Title is a custom field type and Name is a system field type? That is how I would say it. Title is kind of "special" custom field, since it enabled by default for all templates. I have never removed it, even if it has been unnecessary few times. I love the fact that I always have $page->title which would give me something readable in every case. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now