This forum is for module development and code related questions, not general module support. For general support, use the post installation forum.

Drupal 8 and preprocess node

I am trying create module, which check every nodes (type "article")  and replace some string - for example external url to something what I wish. My problem is, that print_r or var_dump after node_load is too big and I get error Allowed memory size of 805306368 bytes exhausted.

I created something like this:

function mymodules_preprocess_node(&$variables) {

$node = $variables['content'];

}

Linking a custom page to an image using Views

Hi,

I have created a page using Drupal views. And I have displayed the logo field in the view settings, like this:

https://imgur.com/a/5Ywpyi0

I want to click on the image displayed, so that it takes me to a custom page. The url for the custom page has a dynamic variable : /text/{textid}/content. textid is the node id for the content.

I am trying to add the link to this image using the following settings:

https://imgur.com/a/b9L1hg7

Webform results based actions

I need to code for a questionnaire and based on the answers provided by the user, I need to display the products to the user. I understand Webform will take care of the questionnaire part, but I cannot use those results to perform my further actions I believe. So any suggestions or other modules I should check out or any help is appreciated.

geofield, kml and points

Currently on drupal 8 geofield I can create a map of locations with custom icons: no problem.  I can also create a map from a kml file.  I cannot do both with the same map.  Is there a way to derive more of the information contained in the kml file?  If I have a kml file that has both polygons (in my case routes) and site locations (with balloons and icons) the only label for each balloon is the name of the node not the name assigned to the point in the kml file.  I'm using google maps to display the map.  

Howto access a pages taxonomy from a block?

I'm new to Drupal development and created a new very basic custom module similar to what you find here https://github.com/xaiwant/drupal8-block/tree/master/article .

One of my content types includes a taxonomy which allows to choose between a bunch of predefined HTML segments stored in the taxonomy description fields.

Now I would like to access this description field content of the current node from my custom block, but I have no clue how to access the proper variables.

tempStore not working for anonymous users

I've got a D8 module that depends on tempStore working for anonymous user sessons.  I'm pretty sure that we had it working earlier in the year, but recent tests show that it's not working now.  Has there been a change in D8 in the last few months (we've been keeping up with Drupal 8 updates) that would have affected the way D8 handles TempStore for anonymous users?  Is there any way to restore tempStore working for anonymous user sessions?

Pages

Subscribe with RSS Subscribe to RSS - Module Development and Code Questions