1. The forums have been upgraded to XenForo 1.4. Please post any issues or comments here.
  2. Our hosting provider will be performing some scheduled maintenance and upgrading during the early morning (US time) of Tue 28th July, starting at approx 2am EST, which will require some down time of the server.

Tips to integrate Flexicontent/Content and Fabrik

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

  1. KingoftheRoad

    KingoftheRoad Member

    Level: Standard
    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

    KingoftheRoad Member

    Level: Standard
    Friendly pump.
     
  3. troester

    troester Well-Known Member Staff 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