Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Barry Diston
  2. F2C Front-end / menu settings
  3. Tuesday, 21 February 2017
  4.  Subscribe via email
Hi,

I have been using a single content type for all languages, which has worked well until recently, when I have needed to seperate out the categories into different languages. At that point I seen these instructions for using f2c with different languages:

===
1) Create different (nested) categories for you content per language.
2) Create a copy of your F2C submission form and F2C template PER language (i.e., several F2C Content Types)
3) Link each F2C content type to the correct Joomla categories for saving the articles
4) Make sure you have language settings set correctly.

WE DO NOT RECOMMEND YOU USE ONE F2C CONTENT TYPE FOR CREATING ARTICLES IN DIFFERENT LANGUAGES
===

This solves the category selection having it show in the current selected language, but this introduces a problem with the articles displayed in the F2C article manager, The menu settings under "Options" asks to select which content type it will display articles for. Previously, with one content type, it would show all of that users articles, no matter what language the article was. Now, it looks like I can only display a users articles from a certain language (or content type)

My question is.. How do I seperate the categories into languages as per the instructions above, whilst at the same time, having an F2C Article Manager, that shows all of the current users articles, regardles of what language the articles are created in?

Thanks for your help,

Barry
Responses (6)
Accepted Answer Pending Moderation
Version Details:
F2C Pro 6.15.0
Joomla 3.6.5
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 1
Accepted Answer Pending Moderation
Hi Barry,
Apologies for the very late replay, we had a holiday and I got ill afterwards.

The only way is to add a front-end article manager per language. Ie Manage English articles | Manage Dutch articles.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 2
Accepted Answer Pending Moderation
Hi Patrick, Thanks for getting back to me and I Hope you are feeling better !

I found a workaround, that works perfectly all except that it introduces a small new problem. Hope you can help ?

Here's what I did:

I swapped the F2C article editor, for a link to the Joomla Latest Articles Module.

Edited: modules/mod_articles_latest/helper.php removing line 50:
$model->setState('filter.published', 1);

The module can then be set to show all of the current users articles, regardles of the language they are in.

Users can then select an article, and on the following page using the f2c "Edit Article" button, they can edit it

To create a new article, I have created menu links within a hidden menu for each language Content Type (Language). The add new article menu link goes to a standard joomla article page, which prompts the user to select their language, - The language selection is just a hyperlink to the relevant content type for the language they have chosen.

All great so far, except only that the save button now behaves differently when creating a new article. - Before when pressing save from an article being created using the "New" button within the F2C article manager, the article was saved, staying on the same page. Now the save button closes the editor (acting as a save and close).

I have tried to find a URL for the "new" button within the f2c article manager, but nothing is showing, - If I can get the menu links to direct to the editor that is launched from the F2C article editor, could this solve the problem? Is there any other way to get the save button to function in the same way as it did from within the f2c article manager? It is now working perfectly, all apart from that little problem, any suggestions would be great.

Thanks for your time,

Barry
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 3
Accepted Answer Pending Moderation
Hi Barry,

How does the form behave when you use the link from the hidden menu directly? Also have you checked the menu settings of the form options? Maybe use the non-sef URL?

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 4
Accepted Answer Pending Moderation
Hi, Sorry for the delay, and thank you for the suggestions.

Using the menu link, the form behaves the same, I have tried the direct non sef link, but that returns a page that looks like the attachment, and I have checked menu settings also.

Since my last post, it turns out that we need to have the functions of the f2c article manager, specifically the "Copy" function, to be able to copy articles, and have them translated into other languages. This brings me back to using the one content type, and allowing users to copy between languages using the F2C Article Manager. The initial problem I had about the categories not being translatable, I have found a close workaround, and that is by creating the category list manually as HTML in the front end F2C templating using :

<div class="controls f2c_field_value"><select id="jform_catid" name="jform[catid]" class="inputbox required" required aria-required="true">

<option value="">- Select a category -</option>
<option value="01">{php}echo JText::_( 'Category1' );{/php}</option>
<option value="02">{php}echo JText::_( 'Category2' );{/php}</option>
<option value="03">{php}echo JText::_( 'Category3' );{/php}</option>

</select>
</div>

This makes it translatable, Almost a working solution, except, in my dropdown list, it will not pre-select the existing category to which the article belongs, like it would do when F2C builds the category selection list.

I appreciate this code below may not make perfect sense, I'm not a php dev, but can you see what i'm trying to achieve, and is something like this possible, so that the current category to which the article belongs is ready selected within the F2C article creator?

<div class="controls f2c_field_value"><select id="jform_catid" name="jform[catid]" class="inputbox required" required aria-required="true">

<option value="">- Select a category -</option>
<option value="01" {php} $catid = JRequest::getInt('catid'); if ($catid == 01) : ?>selected="selected"{/php}>{php}echo JText::_( 'Category1' );{/php}</option>
<option value="02" {php} $catid = JRequest::getInt('catid'); if ($catid == 02) : ?>selected="selected"{/php}>{php}echo JText::_( 'Category2' );{/php}</option>
<option value="03" {php} $catid = JRequest::getInt('catid'); if ($catid == 03) : ?>selected="selected"{/php}>{php}echo JText::_( 'Category3' );{/php}</option>

</select>
</div>

Thanks for the help and support,

Best Regards,

Barry
Attachments (1)
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 5
Accepted Answer Pending Moderation
Hi Barry,

I'm afraid that you lost me on the details but glad that you got things working for you, be it mostly.
My skills for this part aren't sufficient so I hope the community can help out with getting the selected option sorted.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C Front-end / menu settings
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.