• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating widgets containing links to pages

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:


<div class="col-sm-6 col-md-3">
       <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; ?>

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.

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.