3

I'm trying to create a tab on the contact page that calls an AngularJS Url. However, civicrm removes the # and everything after it.

I've tried drupal's url() function, still doesn't work. Please let me know if there is a way to do this.

function contactcampaign_civicrm_tabset($tabsetName, &$tabs, $context)
{
    /* Ensure it's the contact view tabset */
    if ($tabsetName != "civicrm/contact/view")
    {
        return;
    }

    /* Add a new tab */
    global $base_url;

    $tabs['personal_campaign_pages'] = array(
        'title' => ts('Personal Campaigns'),
        'url' => '/civicrm/a/#contact/campaign/all',
    );
}
3

I don't think that is possible, but not for the reason you think. The problem is not whether or not the link gets rendered correctly, the problem is that AngularJS expects to launch a single-page-app, not load an html snippet into a tab. If you need to link to an angular page, you will need to do so as an actual link, and it will have to take the user away from the contact summary page and over to the angular page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.