Replacing the front-end Joomla edit-icon with F2C edit functionality

This article describes how to override the default Joomla edit functions in the front-end with Form2Content edit functions.

This feature automatically detects whether the article can be edited with Form2Content. When you have the sufficient permissions it will remove the default Joomla edit buttons.

In order to edit the article with Form2Content, you have to include the Edit Article Plug-in in your F2C template.

Please note: this feature is available for F2C Pro 6.5.0 and higher only in combination with Joomla 3.4.1 and higher!

Please note: This article has been updated for use with Joomla 3.4.1 / F2C Pro 6.5.0 and higher.

  • Create a template override for the com_content article view.
  • Copy the file components/com_content/views/article/tmpl/default.php to the directory templates//html/com_content/article/
  • Open the file for editing.
  • Find the following code on line #21:
  • Add the following piece of code after that line:
    // F2C modification start
    JHtml::addIncludePath(JPATH_SITE . '/components/com_form2content/helpers');
    JLoader::register('F2cSecurityHelper', JPATH_SITE . '/components/com_form2content/helpers/security.php');
    $canF2cEdit = F2cSecurityHelper::canEdit($this->item->id);
        $canEdit = false;
        $params->set('access-edit', false);
    // F2C modification end
  • The code above will only disable the default Joomla edit functionality when it finds an article that can be edited through F2C. In order to edit the article itself through F2C you have to include the Edit Article plugin in your F2C template.

F2C Cheat-sheet

An overview of all template parameters (placeholders for your form data). These are used in your F2C intro and main template to parse the data from your submission forms into the Joomla article.



Form2Content, a Joomla CCK Documentation © 2010 - 2015 Open Source Design | Powered by Form2Content