How to go to a next page after saving

What options do we have after saving a new item, the right next page depends on the type of the content that we are adding.
How to go to a next page after saving
How to go to a next page after saving

In order to decide what is the best next page, we need to think about the most efficient way of using KAS:


Is the user is going to be adding many things at the same time?

Then maybe we need to stay in the same page so he can continue adding.


$nexturl = $self_url;


Is the user going to edit the recently added data, like an image?

Then we should go to the edit page of the recently added, we can always send query strings ?query=value
Note: $KMID:$KSMID:$KSMOID are predefined. This will submit the new generated ID automatically


$editoptiontype = 'FUW';

$nexturl = "self_edit:EDIT PAGE NAME:$KMID:$KSMID:$KSMOID:$editoptiontype"; 
+ “.kas?query=value” (optional)


or if the edit Page is in another section:


$nexturl = "self_edit:PAGE NAME:MENU:SUBMENU:SUBMENU OPTION:$editoptiontype"; 
+ “.kas?query=value” (optional)
$nexturl = "self_edit:CLIENT SUMMARY:BILLING:CLIENTS:CLIENT SUMMARY:$editoptiontype"; 
+".kas?newClient=true&var=value”; (optional)


Or if the id value is different (see the last example instead of this one as it is recommended):

$editoptiontype = "VCRQLEDBWOX";
$nexturl = "edit:PAGE NAME:MENU:SUBMENU:$idvalue:$editoptiontype"; 
+ “.kas?query=value” (optional)
Example: $nexturl = "edit:CLIENT SUMMARY:BILLING:CLIENTS:$CLID:$editoptiontype"; 
+ ".kas?newClient=true&var=value”;


Is the user going to see all the items added to order them?
Then we goto the View section, as long as we are in the same Menu and Submenu section:

$nexturl = $this_subsection.".".translate('VIEW PAGE NAME','VER PAGINA','VOIR PAGE'); 
+ “.kas?query=value” (optional)


RECOMMENDED: If you need to go to any section in particulat, you can use the getPath() function,


$nexturl = getPath('SECTION','SUB SECTION','VIEW PAGE');
+"?query=value" (optional)


if the section requies an ID add the option type and the ID at the end


$nexturl = getPath('SECTION','SUB SECTION','EDIT PAGE','OPTION TYPES',$db_items->result($i,"ID"));
+"?query=value" (optional)


Get a Quote

Get a Quote