0

I am having a problem with token replacement in a views footer. I added a "Global: Unfiltered text" footer, and checked "Use replacement patterns", and added [title]. However, it shows up as the literal string [title] on the view, not the title from the first row.

Here's the footer I've created:

replacement pattern in footer

And here's the view preview:

view preview

And here's the actual view, where we should see "Sample Article" instead of "[title]". Note that "Sample Article" is the title of an article node, so there is one record showing in this view:

actual view

I can't tell what I've done wrong. FWIW, I put an export of the view here.

How can I get the tokens to render properly in my view footer?

  • What drupal version are you using 7 or 8? – No Sssweat Apr 23 '16 at 7:27
  • I'm using Drupal 7. – user1359 Apr 23 '16 at 15:22
1

I did use the link you provided and noticed that you are not using fields.

The selected style or row format does not utilize fields.

Now, if you simply select the "Force using fields" in your "Unformatted List" >> "Settings" panel, you will get this to work.

Cheers!

  • Thanks for taking the time to test the sample code I provided : ) – user1359 Apr 25 '16 at 15:38
  • Sure thing, was the best place to start. ;-) – Stefanos Petrakis Apr 25 '16 at 16:09
1

I can't tell from the examples provided ... but if a View has no results from the database, then tokens are not replaced.

  • "Sample Article" is the title of the one article row. This is showing in the last screenshot. – user1359 Apr 22 '16 at 17:48
  • If you're up for it, you could import the view export in the link I provided, and see if you get the same behavior. – user1359 Apr 22 '16 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.