Incremental content grouping on a custom page?

Discussion in 'Integration' started by saepekki, May 23, 2011.

  1. saepekki

    saepekki New Member

    Joined:
    May 19, 2011
    Messages:
    2
    ...and on members home page as well?

    The following code is showing all the (active) links on a custom page:
    PHP:
    <?php
    if ($_SESSION['_amember_links'])
    {
    echo 
    "<ul>";
    foreach (
    $_SESSION['_amember_links'] as $link_id => $link)
    {
    echo 
    "<li><a href=\"".$link['link_url']."\">".$link['link_title']."</a></li>";
    }
    echo 
    "</ul>";
    }
    ?>
    Output:
    Code:
    1.1 One 1
    1.2 One 2
    2.1 Two 1
    2.2 Two 2
    2.3 Two 3
    Is it possible to modify it to show links like this:

    Code:
    1. Group One
      1.1 One 1
      1.2 One 2
    2. Group Two
      2.1 Two 1
      2.2 Two 2
      2.3 Two 3
    3. Group Three
    etc... ?

    $_SESSION[_amember_links] has [link_group_id] with every link, so I guess it can be done somehow.

    Any ideas?
    Thanks in advance.

    P.S. I don't want to use [site]/plugins/protect/incremental_content/?product_id=#
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can include /plugins/protect/incremental_content/index.php from your php file, as I understand it do what you need already.

Share This Page