⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Help with Simplicity here?



richb201

richb201
  • profile picture
  • Member

Posted 28 April 2018 - 15:50 PM

I am using 5 or 6 separate cruds and using Johnny's  CI Simplicity which works great. I just realized that users won't know which crud they are on! So I want to put a title somewhere on the screen.

 

I have not found any support forum for Simplicity. Do you guys know Simplicity?

 

Here is the code from my view:

    <div style="height: 0px;" class="nav-collapse collapse">
    <ul class="nav">
    <li class="active"><li><a href='<?php echo site_url('Configure/campaign_management_with_actions')?>'>Campaign</a></li>
    <li><a href='<?php echo site_url('Configure/maintain_employees_management')?>'>Maintain Employees</a></li>
    <li><a href='<?php echo site_url('Configure/business_component_management')?>'>Business Components</a></li>
    <li><a href='<?php echo site_url('Configure/projects_management')?>'>Projects</a></li>
    <li><a href='<?php echo site_url('Configure/activity_management')?>'>Activity</a></li>
    <li><a href='<?php echo site_url('Configure/custom_activity_management')?>'>User-Defined Activities</a></li>
    <li><a href='<?php echo site_url('Configure/org_chart_management')?>'>Org Chart</a></li>
    <li><a href='<?php echo site_url('Configure/view_activities')?>'>View/Export Actitivies</a></li>
    <li><a href='<?php echo site_url('Configure/help')?>'>Help!</a></li>
    <li><a href='<?php echo site_url('Users/logout')?>'>Logout</a></li>
     </ul>
When a user picks one of these choices along the top, the go to that function in my Configure controller. If I could just put a string CURRENT CRUD: xxxxxx
where xxxxxx is the name of that screen it would surely help. I am very scared of breaking this thing through trial and error. So simple is really apprcciated. 
 
Or can I put some code in each controller function that says what screen it is on?
 
I sure hope someone know ho to do this!
 
thanks in advance.....

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 09 May 2018 - 04:12 AM

You can use 

$this->load->section

 for that.

 

For example in your case:

$this->load->section('menu', 'menu.php', ['action' => $currentCrudName]);

For more check example_3 here: https://github.com/scoumbourdis/codeigniter-simplicity/blob/master/application/controllers/example.php

and here: https://github.com/scoumbourdis/codeigniter-simplicity/blob/master/application/views/themes/default.php (search for 

$this->load->get_section('sidebar');

)

 

Regards

Johnny