Skip to main content
  • 1
    views
    0
    answers
    It appears as though The particular Football

    It appears as though The particular Football Is Guiding MLB&8217;azines Energy Rise | FiveThirtyEight It appears as if The Soccer Is actually Behind Baseball azines Energy Spike Share about Facebook or myspace Reveal on Facebook Residence operates have already been strangely increasing because halfway from the 2015 time of year. Robert Ehrmann Per Getty Photographs The fantastic great hit secret of 2015-17 has become sorted out.

    Drupal
  • 75
    views
    0
    answers
    Taxonomy list dependent on choice from another taxonomy list, drupal 8

    I need to select 'make' eg Toyota from a taxonomy list of car brands so the next taxonomy list only shows Toyota models only. I have taxonomy list "make" with Toyota, BMW, Benz etc then other lists of all the models EG "Benz" with A-Class, C-Class, ML etc for all the models. I'm using the internet example "http://www.drupal8.ovh/sites/drupal/files/2016-10/vehicle_full_wviews.zip" to add this fuctionality on to the "VehicleForm". 
    Here is my code:
    <?php
    namespace Drupal\vehicle\Form;
    use Drupal\Core\Form\FormBase;

    Drupal 8
  • 48
    views
    1
    answers
    Clear view after save a node

    Hi,

    I need to clear the display of a view after updating a node but it did not work in _hook_node_update.  I have tried in _hook_node_presave:

    function module_node_presave($node) {
      if (($node->type == 'article') || ($node->type == 'gallery') || ($node->type == 'video')) {
       $view = views_get_view('news');
       $view->set_display('display_1');
       $cache = $view->display_handler->get_plugin('cache');
       $cache->cache_flush();
      }
    }

    But it does not work either. Does anyone know how to do it? Thanks!

    Drupal 7
  • 73
    views
    1
    answers
    How can I restrict various roles with limit in creating nodes of a particular content type

    How can I restrict various roles with limit in creating nodes of a particular content type?

    Drupal 7
  • 20
    views
    1
    answers
    Displaying the username of the user who created the node in the node template file

    I created file node--my_content_type.tpl.php, where I'd like to print the username as string. I tried the following code, but unfortunately it doesn't work. How can I do it?

    <?php 
      print $name;
    ?> 

     

    Drupal 7