Skip to main content
Deep linking with Drupal

Set up a link to go directly from a page in DubBot to editing that page in Drupal

Updated over 9 months ago

DubBot offers deep linking to Drupal. The deep link will display in an added View in dropdown as you navigate your pages flagged with issues. Using the View in dropdown, when your named Connector is selected, it will take you directly to edit your page in WordPress using a Connector the site administrator needs to configure.

Detail Page View top menu, highlighting View In dropdown with Drupal option

Information you need before setting up your Connector

  • Find the URL that you would use to make edits to your content in Drupal.

    • In your Drupal account, if you navigate to a Page or Post for editing, you can find the URL to the editing environment by looking at the address in your browser window. It should look something like the following:

      www.yoursite.com/node/12345

  • Find the location of the unique page identifier for your pages

    • Find a consistent tag in your webpages’ source code to determine the unique identifier for the location of the page in your Drupal account and provide that to the Connector setup in DubBot. You will use the Selector Type of ID.

    • In our above example, 12345 is the unique identifier.

    • For Drupal, a common method for providing the ID in the source code is using the shortlink tag:

      <link rel="shortlink" href="https://yoursite.com/node/12345" />
    • Another location example, in a class tag:

      • <body class="node-12345.....

    • Sometimes, the full URL needed for editing a page is located in a href attribute of a link in the source of a page. In this case, you will use the Selector Type of URL.

    • If one of these does not currently exist in your source code, it may be something you will need to have your website administrators add to your Drupal templates. We have found a Drupal module, Body node ID class, that adds node ID (nid) and node type as a class to the <body> tag on node pages.

Step 1: Creating your Connector

  • Select the Settings button to access your Account Settings Panel

  • Select Connectors in the Left Navigation

  • Select the Create new connector Button

First, select the Settings button in the Secondary Nav. Then, select Connectors in the Left Nav. Thirdly, select the the Create new connector button.
  • Enter the name of your choice for the Connector in the Name field.

  • In the Type dropdown, select Generic Selector.

Close up section of the "Create new connector" dialog box with the Name and Type field both required fields.

Step 2: Add the specifics for your Connector

  • Select ID in the Selector Type dropdown, if it applies in your situation.

    • Enter the CSS Selector for the element holding the needed page ID.

    • Enter the Attribute with URL value - Designate the attribute from within the chosen HTML element that holds the unique identifier, in this sample case : class .

    • Check the Use a Regex to parse attribute check box if needed, then enter the Attribute value regex to get the ID from the specified attribute, ex.

      page-node-(?<PAGEID>\d+)

    • CMS Edit URL Use regex to build the Deep link connection.

      ex. https://{HOST}/node/{PAGEID}/edit
      {HOST} is a variable in DubBot that will map to the root URL of your site.

    • Select the Save button to save your Connector

The full dialog box for setting up a connector. Each field is required.

OR

  • Select URL in the Selector Type dropdown, if it applies to your situation.

    • Enter the CSS Selector for the element with the needed code

    • Enter the Attribute with URL value - that is the attribute that holds the URL.

    • Select the Create button to save your Connector

The fields shown when the Selector Type of URL is chosen for your connector.

As with any setup, the DubBot support team is available to help you through these steps. Just simply chat us and we will get someone to guide you through the process.

Did you know there is a DubBot Drupal module? View a simplified version of the DubBot interface while working on pages inside Drupal.

Did this answer your question?