Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3403306
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:14:42+00:00 2026-05-18T05:14:42+00:00

I want (need) to write an input filter, which replaces tokens with the values

  • 0

I want (need) to write an input filter, which replaces tokens with the values of other fields of the current node (images, for example). I thought about hacking with global variables, but perhaps there is a cleaner solution to access the current context inside a input filter?

Simply loading the node with arg(1) works in node pages, but in lists I’m getting into trouble.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:14:43+00:00Added an answer on May 18, 2026 at 5:14 am

    As far as I know you can’t.

    Filters are supposed to modify only the received text to be printed.
    Drupal developers discussed about the possibility to add more context to hook_filter but they decide to avoid that because too hackish and beyond the filter action range.
    Besides, filters are used not only for nodes but also to comments, etc. so the context would have been more complicated to manage.

    It is suggested to use nodeapi in that case.

    Here’s a discussion (about drupal 5, but I think it’s still valid):
    http://drupal.org/node/106249

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write video filter for Adobe Premiere, and I need to print/draw/render
I want to write a function which will take a series of fields and
I want to write a sed filter that changes all periods in its input
I need to write a forum application for a friend's web site. I want
I need to generate an XML file in C#. I want to write the
I want to write a java code to read the input XML file and
I'm using paging which uses a stored procedure to filter by letter. I need
I need to write a CVS export program which internally use UTF-8 encoding which
I need to do a user input validation, and I want it validated both
I want to write a Java method which reads in a bash script into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.