Allow route for node.add to fetch the content type value based on page url e.g. node/add/article should return article

Created on 27 December 2024, 24 days ago

Problem/Motivation

[current-page:node:content-type:machine-name] does not work for file uploads when adding content it only works for edit pages,

Steps to reproduce

1. Add [current-page:node:content-type:machine-name] token on any file attached to any content type e.g. node
2. While adding a new node it does not replace the token with its value, instead just shows token

Proposed resolution

so to provide a fix to start with I am suggesting checking the route and if its node.add then add token from page arguments. e.g. if its /node/add/article we fetch article from url and then add it in tokens
in other cases wehere route is edit it will automatically fetch from node object in context

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India hash6

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024