Tips to integrate Flexicontent/Content and Fabrik

Discussion in 'Standard Support' started by KingoftheRoad, Jan 31, 2011.

  1. KingoftheRoad Member

    Level: Community
    Hi Guys,

    I use the following approach to integrate Flexicontent/Content with Fabrik and need your further advice to complete it.

    I create a content type in Flexicontent as follows:

    1) Description (= com_content->description)
    2) Form , actually a text_area with default {fabrik ID=5 view=form}

    So, this content type consists of a Com_content's Description and a Fabrik Form.

    In the Fabrik Form, I create an element "ContentCode", it retrieves the "id" of the com_content from the URL with default php as below:


    Code (text):
    function curPageURL() {
     $pageURL = 'http';
     if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
     $pageURL .= "://";
     if ($_SERVER["SERVER_PORT"] != "80") {
      $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
     } else {
      $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
     }
     return $pageURL;
    };
    $str = curPageURL();
    parse_str($str, $output);
    return $output['id'];
    It actually retrieves the field id from the URL. It is actually the article id of com_content.

    Now, I have the article id of com_content as an element of the Fabrik Form, how can I retrieve the "title", "description" ...of the com_content via database lookup to save these data as elements of the Fabrik form?

    What element types I shall use and what php expression I shall use?

    Many thanks.

    Seth
  2. KingoftheRoad Member

    Level: Community
    Friendly pump.
  3. troester Well-Known Member

    Level: Standard
    Not quiet sure what you need, do you mean jos_content?

    You can create a fabrik table linked to any database table including Joomla core tables (make sure to set "alter existing fieldtypes"=no) or you can retrieve data from database tables, see http://fabrikar.com/forums/showthread.php?p=107621

Share This Page