Welcome Guest, Not a member yet? Register   Sign In
Creating widgets containing links to pages
#1

I've made an open-source blogging application and I need some help with it. The application supports not only posts, but pages too.

also uploaded an instance of the application, with dummy content, on my server. Click on HERE to see it.

The concrete problem: in the footer of the site I display some pages (not posts). The way I display them is unsatisfactory for me, because it implicates hardcodeing:

   

Code:
<div class="col-sm-6 col-md-3">
      <h3>Legal</h3>
       <ul class="list-unstyled">
       <?php foreach ($pages as $page): ?>
        <li><a href="<?php echo base_url('pages/page/') . $page->id; ?>"><?php echo $page->title; ?></a></li>
       <?php endforeach; ?>
      </ul>
   </div>    


This allows me to display the pages in only one "box". Maybe I would find a solution that lacks... elegance (it would involve some if statements) to display two pages in each box


Perhaps widgets (like WordPress has) would be a good idea. Widgets in which I could drag-and-drop (links to) pages and other entities. I have not found any tutorials on making widgets in Codeigniter.

I don't now if CI has helpers or any other features to support widget creation. I am a beginner (intermediate at best) PHP developer so I don't know where to start creating this feature. Please help. Come with the best approaches.
Reply


Messages In This Thread
Creating widgets containing links to pages - by Ajax30 - 12-07-2018, 06:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB