Dkouk
Dkouk

Reputation: 339

portlets content can't find the place on webpage Kademi platform

my dashboard use some portlets, and i want to edit them so can create my own style at Kademi platform.

Could you tell how i can find them and edit/create new one. for example this portlet :

#portlets("dashboardPrimary")

Thanks.

Upvotes: -2

Views: 46

Answers (2)

brad
brad

Reputation: 854

To edit a portlet you simply override the template which generates it. For example, the dashboard alerts app renders current alerts into the "beforeDashboardPrimary" portlet section with this template:

https://github.com/Kademi/kademi-dev/blob/master/src/main/webapp/templates/apps/alerts/dashboardAlerts.html

#foreach($msg in $alerts)
<div class="dashboard-alert alert alert-${msg.type}" >
    #if( $msg.id )    
      <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
      <a class="hide msg" href="$msg.href">Ack</a>
    #end
    $msg.body
</div>
#end

So to change the layout of dashboard alert messages you would create your own template at: /theme/apps/alerts/dashboardAlerts.html

Upvotes: 0

Wesley Tuzza
Wesley Tuzza

Reputation: 145

the dashboardPrimary portlet get's used by several apps. Here is a list of built in kademi apps that use it:

  • Reward Store app: /theme/apps/rewardstore/dashboardCategories.html
  • My Files App: /theme/apps/myfiles/filesPortlet.html
  • Blogs App: /theme/apps/blogs/dashboardBlogs.html
  • Learning App: /theme/apps/learner/dashboardModules.html
  • Vouchers App:
    • If redeemer: /theme/apps/vouchers/redeemerPortlet.html
    • If Supervisor: /theme/apps/vouchers/supervisorPortlet.html

There is a good tutorial on Kademi's doc site on templating in kademi: http://docs.kademi.co/programs/dev/d1/d11/p1.html

I hope this helps :-)

Upvotes: 0

Related Questions