This forum is for less technical discussions about the Drupal project, not for support questions.

Conditional redirection from a webform page to a submission

How to set such a thing in Drupal 10.2 for a following case?

If users have submissions, show them their submissions' pages for further editing, if not, show the webform page instead.

All authenticated users are given permission to edit their own submissions and view each other's.

That redirect is aimed to fulfill a directive "One submission per user", making those easier to read, export, search and edit for the authorized personnel. Some functions, or even a compatible module would suit well...

How to load the content of JSON local files into Twig

Hello, everyone

I have a difficult problem, How to load the content of JSON files into Twig.

json file: /sites/default/files/json/test.json

{
    "nid":"123",
    "title":"it is a title"
}

The following cannot be extracted normally:

{% set jsondata = "/sites/default/files/json/test.json" | json_decode %}
{% set jsondata = source("/sites/default/files/json/test.json") | json_decode %}
{% set jsondata = include("/sites/default/files/json/test.json") | json_decode %}

How it do?

Thanks

Constant login details

When opening the site the last users details are visible in the login box. I heard 'login register path' would fix it so I tried to download but there doesn't seem to be a Drupal 7 version. Any advice would be very welcome.

PHP Code with Drupal 10

Hi. 

I wanted to know if it is possible to insert php code into pages under Drupal 10.

I create a text editor with None but it doesn't recognize the code and I don't know what else to try.
Thank you very much in advance

Primary domain and alias domain use same url

Hello!

My goal is very easy in thought.
What im trying to accomplish is using a alias domain to display everything that is related to the primary domain.
Site is Drupal 7 version.

It will share the same db/website/public_html dir/users
I have Cpanel.

Domain1.com (Primary)
Domain2.com (Alias)

I succesfully setup the alias domain but when trying to display it in the browser the domain jumps back to primary domain when it comes to /node/ permalinks

Example:

Do you support the idea of having two sidebars in a website?

Do you support the idea of having two sidebars in a website?

Do you think it's web-accessible?

Do you think that it's still "modern" to have it?

I think it can help a bit with SEO because there is more peripheral content tied up with the central content of the node itself, but it can also be a bit distracting or "over the top" and I would like the get some opinions about that.

Pages

Subscribe with RSS Subscribe to RSS - General discussion