Changing the default welcome screen

From Achievo/ATK Wiki

Jump to: navigation, search

ATK Howto: Changing the default welcome screen

Complexity: advanced
Author: Ivo Jansch

List of other Howto's

By default an ATK application shows a welcome screen after the user first logs in. Sometimes you want to immediately send the user to a specific screen instead of the welcome screen.

Let's assume that you want to send the user directly to the admin screen for news items. Take the following steps to accomplish this.

Open index.php and find this section of code, near the bottom of the file:

  $indexpage = &atknew('atk.ui.atkindexpage');
  $indexpage->generate();

Add a line between those two lines:

  $indexpage = &atknew('atk.ui.atkindexpage');
  $indexpage->setDefaultDestination(array("atknodetype"=>"content.news", "atkaction"=>"admin"));
  $indexpage->generate();

This will open the app directly with the admin screen of the news node in the content module.

Personal tools
Navigation