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

How to trigger a page redirection from .tpl.php page?

Hello,

I used a tutorial Building a real time chat module with node Js to make a small module that is able to receive an instant message.

On reception of this message I just want Drupal to redirect to a specific page.

Here is an extract of the code of the .tpl.php file:

How to implement ConditionInterface::conditionGroupFactory in dynamic query

I’m trying to create a dynamic query, the query logic conditions needed are: AND, and OR.

The main query will include two sub queries.

The ConditionInterface::condition documentation states that:

“If called with 1 parameter, it should be a ConditionInterface that in itself forms a valid where clause. Use e.g. to build clauses with nested AND's and OR's.

How to implement ConditionInterface::conditionGroupFactory

I'm having trouble understanding the implementation of conditionGroupFactory in my dynamic query.

I've tried two methods of implementing:

$connection = \Drupal::database();

$result = $connection->select('inventory', 'inv');

$result->fields('inv', ['part_number']);

$result->condition('inv.visable', 1);

How Can I Hide Empty Fields in tpl File

I am trying to exclude fields if they are empty, on the portfolio page I am creating with node--portfolio.tpl.php.  I have tried several variations including:

             <?php if (render($content['field_portfolio_video'])): ?>
                     <h5 class="mt-sm mb-xs"><?php print t('Related Videos'); ?></h5>
                     <?php print render($content['field_portfolio_video']); ?>
             <?php endif; ?>

and 

Drupal 8 - Add custom tabs on user profile page

Hi everyone,

I am new to Drupal 8 and drupal development in general. I am currently working on a project using the latest verion of Drupal 8.6.

I have written a custom module by following the drupal guides and everything works.

I now need to add a "tab" to the user profile page that links to my module. It should look something like this :

https://i.stack.imgur.com/7FMbs.jpg

Webform embed image in HTML mail

My customer likes the new Webform and is using it to allow anonymous users to send in a photo to a team member in filling out the form. Of course, we're using the default private setting because exposing the app to potential malicious files is not worth the risk.

But customer finds that they need the photo in the email to help diagnose customer complaints. The image is missing but is linked to a private file on the app. 

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions