Registering Hook Handlers for a Subset of Pages

I've found on recent projects that I want to use the Customer Portal hook system to register hook handlers, but want to restrict the execution to only certain pages (or triggered by other conditions). Turns out this is very easy to do as hook handlers are registered in the config/hooks.php file using very standard PHP code. Because there is no DSL (Domain Specific Language) you can use any other PHP statement you desire in the config/hooks.php file and it will be evaluated and executed whenever a request is made to the Customer Portal.

Updated: SP5 (in CX 13.2) Commit Bug w/ active CPM

Updated 2013-12-17: Additional tests found that this issue only manifests when a CPM is active on an object. The post has been updated to reflect the new findings

Supplying Contextual Report Filters to CBO Reports in Customer Portal

In Customer Portal you may notice that much of the content is supplied by Analytic Reports that are filtered by the ID of the logged in Contact. An example of this is the list of submitted Incident's found on the Account Overview page (/app/account/overview).

The framework automatically adds a Contact ID filter for Incident type reports as well as Answer type reports. Unfortunately this contextual filter is not automatically added for any other object types.

Creating Custom Page Meta Tag Attributes in CP3

Page meta tag attributes are a Customer Portal feature that allow a developer to establish page behaviors in a declarative fashion. A meta tag is placed at the top of every page (/views/pages) and behavior is defined through the addition of attributes and attribute values. Except for very rare cases, each page has a page meta tag.

A typical meta tag looks something like this:

CPMs 101: Introduction to Custom Process Models

CPMs provide the ability to trigger custom code whenever select objects in the system are either created, updated, or destroyed. This is extremely useful for myriad types of functionality such as external integrations and advanced business logic. This tutorial is a primer for those just getting started and will walk through how to build a simple CPM from the ground up. More advanced CPM articles are also available. Enjoy!

Force Reset and the SOAP API

This error/quirk was originally found by Ben, but I thought it was worth posting about just for future reference.

CP 3.0 Nested Custom Widget Deployment Bug

In CP Framework Version 3.0, nested widgets behave differently depending on whether you are in development mode or staging/production.

PHP Stub Classes for Connect PHP 1.1 (Updated)

One of the many wonderful things about IDE"s is the ability for automatic code completion. Many IDE's support this feature by utilizing PHPDoc code commenting, including Netbeans and Eclipse. Oracle Development hasn't been so kind as to offer ConnectPHP class stubs, so up until now code completion for ConnectPHP has been non-existent. This bugged me for a long time, but I finally decided to do something about it; using PHP Reflection, I was able to generate PHP Class stubs for the entire API. By downloading the class stub file and putting it in your IDE project's sources folder, you will magically get code completion for ConnectPHP!

Creating Custom Widgets in Customer Portal Framework 3

Customer Portal Framework 3 has a nice feature, which allows developers to quickly scaffold widgets using an admin GUI.


Zircon - This is a contributing Drupal Theme
Design by WeebPal.