Block visibility

For RestFul 1.x

Problem/Motivation

You have a content type that you want to be display on specific pages. You want to use the same system as Drupal core block visibility.

Proposed resolution

Add a textarea field to your content type called visibility, with a machine name of field_block_visibility.

Visibility Block Textarea field

Create or add to your endpoint the following code:

Cache max-age

Cache max-age = time dependencies

Cache max-age is analogous to HTTP's Cache-Control header's max-age directive

Why?

Cache max-age provides a declarative way to create time-dependent caches.

Smart Cache

Drupal 8 provides a Smart Cache module that is recommended for websites of all sizes. It caches pages minus the personalized parts, and is therefore useful for all users (both anonymous & authenticated).

We can find this core module at: core/modules/smart_cache.

Other errors not specific to ERPAL for Service Providers

For other errors not specific to ERPAL for Service Providers, but general to Drupal, please visit the page at https://www.drupal.org/node/201875

Pages

Subscribe with RSS Subscribe to RSS - No known problems