Skip to main content
Skip table of contents

Customize Deeplinks

Deep links in PLANTA project allow you to execute user-defined actions directly via URL. For example, users can access a linked module directly from an email—without having to manually navigate the system.

Error rendering macro 'fontawesome-macro' : Page loading failed
Requirements

  • Creation of a user-defined class that inherits from BaseProtocolAction.

Error rendering macro 'fontawesome-macro' : Page loading failed
Procedure

  • Define a class by

    • generating a subclass of ppms.protocol.BaseProtocolAction,

  • implement the execute() method,

  • access URL parameters,

    • self.path_parameters for path segments and

    • self.query_parameters for query strings.

Error rendering macro 'fontawesome-macro' : Page loading failed
Example

PY
from ppms.protocol import BaseProtocolAction, get_any_module_object  

class OpenCustomerModuleAction(BaseProtocolAction):  
    def execute(self):        
        module = get_any_module_object()        
        module.open_module('100000')  

Error rendering macro 'fontawesome-macro' : Page loading failed
Note

  • Save the class, e.g. in customer/protocol.py.

Error rendering macro 'fontawesome-macro' : Page loading failed
Procedure

  • Create a new entry in the Deeplink module:

    • Set action to a user-defined URL (e.g. /special_module),

    • Set the Python function to the path to your Python class (e.g. customer.protocol.OpenCustomerModuleAction),

    • Set a checkmark in the Activated checkbox,

    • Define a Python ID to be able to reference this deeplink at a later point.

  • After setup, calling <planta-web-client>/special_module opens module 100000.

Error rendering macro 'fontawesome-macro' : Page loading failed
Information

  • PLANTA deeplinks support both path parameters and query parameters. Both can be used for filtering or navigating nested hierarchies.

Error rendering macro 'fontawesome-macro' : Page loading failed
Details

  • Used to clearly display hierarchical resources.

  • Path parameters can be defined directly in the deep link URL using angle brackets < >:

    • e.g.: project/<pr_id>.

      • Using the RESTful URL design.

Error rendering macro 'fontawesome-macro' : Page loading failed
Details

  • Used for optional filters or additional modificators.

  • Automatic availability without having to explicitly define a query parameter:

    • e.g.: project/4711?foo=bar

  • The flexibility may also lead to longer URLs.

Query parameter values are always lists, since a parameter can occur multiple times.

Error rendering macro 'fontawesome-macro' : Page loading failed
Note

  • If a user attempts to access a non-existent deep link, an error message is displayed (text constant 002502). Deeplink actions must treat invalid user input respectively in their implementation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.