php working preferrably composer working too
mkdir drupal && cd drupal && curl -sSL https://www.drupal.org/download-latest/tar.gz | tar -xz --strip-components=1
| //render all content without a specific field | |
| {{ content.without('field_name') }} | |
| //render only one specific field | |
| {{ content.field_audio_file }} | |
| //render only one specific field's value | |
| {{ content.field_audio_file.value }} |
| <?php | |
| $tree = \Drupal::service('entity_type.manager') | |
| ->getStorage("taxonomy_term") | |
| ->loadTree($vid, $parent = 0, $max_depth = NULL, $load_entities = FALSE)); |
| <?php | |
| $header = array(); | |
| foreach ($programs->list as $program) { | |
| $rows[] = array( | |
| 'img' => array( | |
| 'data' => array( | |
| '#theme' => 'image', | |
| '#attributes' => array( | |
| 'src' => $program->images[0]->url, //Images come from an external resources, otherwise use #uri on the level of #attributes | |
| ) |
| <?php | |
| if(empty($_GET['submithandler']) && empty($_POST['submithandler'])) { | |
| http_response_code(400); | |
| die('Invalid data'); | |
| } | |
| define('DRUPAL_ROOT', $_SERVER['DOCUMENT_ROOT']); | |
| require_once DRUPAL_ROOT. '/includes/bootstrap.inc'; | |
| require_once DRUPAL_ROOT. '/includes/common.inc'; |
| /** | |
| 1. Make sure the exported file does not exist (archive.csv) | |
| 2. Replace the following with the correct information: | |
| - THE_FOLDER_ON_THE_DAM | |
| - MYCLOUDNAME_HERE | |
| - MY_API_KEY_HERE | |
| - MY_API_SECRET_HERE | |
| 3. npm install csv-writer and npm install cloudinary | |
| 4. Run with 'node cloudinary_metadata_export.js' | |