Adding Articles Section

Open to all! Ask other shopowners for help.
Post Reply
Dnj1964
Member
Posts: 54
Joined: Fri Nov 06, 2020 8:27 pm
Phoenix Version:
Has thanked: 8 times

Adding Articles Section

Post by Dnj1964 »

Looking for a way to add an articles section with different topics.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Adding Articles Section

Post by Kofod95 »

This comes to my mind - of course you'll need a front-end for it as well, which I don't remember to have seen anywhere yet.

app.php/addons/supporters_code/s05e02_i ... extensions

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Adding Articles Section

Post by heatherbell »

Kofod95 wrote: Wed Apr 28, 2021 6:32 pm This comes to my mind
app.php/addons/supporters_code/s05e02_i ... extensions
Yes, we used the folders extension to make something like that.
We created a new page and other files that go with it.
In that page, the relevant code to show links to pages within a specific folder ID we used is below.
This example shows the links as buttons:

Code: Select all

<div class="row">
  <?php
  $containment = info_pages::getContainer(['pd.languages_id' => '1',
  'p.folder' => '12', 'p.pages_status' => '1']); 

  foreach ($containment as $k => $v) {
    echo '<div class="col-12 col-md-6 my-2">' .  PHP_EOL;
    echo '<a class="btn btn-lg btn-block btn-primary" href="' . tep_href_link('info.php', 'pages_id=' . $v['pages_id']) . '">' . '<i class="far fa-file-alt"></i>&nbsp' . $v['pages_title'] . '</a>' .  PHP_EOL;
    echo '</div>' .  PHP_EOL;
      }
?>
</div>
It works for us.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply