Cannot alter output of a view under any circumstances I am running into a repeat issue with views and the lack of ability to apply or stick additional classes to a field. We have a "view all content" page that renders fields pertaining to a certain content type and its views through a "Custom Text" field and a variety of excluded fields (so we can render them inside our Custom Text field, to better resemble what the front-end team expects). One of these rendered fields is a hyperlink, and the design team would like to see a class added to it so they can limit a broad set of CSS rules for it.

Okay, simple right? Just go into the field, style settings, and customize its HTML. Done, added classes. But they aren't showing up for this hyperlink. I even tried a more untenable approach of applying a class through a tpl.php rewrite and a Regex. But as long as this field is being displayed through a "Custom Text" field, it does not assign any classes.

The design team has informed me there is no other approach for this given the use of Global Text here. Is there any way to alter what the tokens used by other fields in Drupal output in terms of raw HTML markup, including the addition of other attributes such as classes when taking this design approach?
When you use Custom Text, you are telling Views to override anything it does and display only what you have provided it plus the addition of your placeholders. So what you should do here is exclude the original field from the display and write your HTML with the class into the custom text field. Then, include the field placeholder.

Like this.

  &lt;a class="my-class" href="[field_link_url]"&gt;[field_link_title]&lt;/a&gt;


I am pretty sure this gets you the intended result. Note I am making up those placeholders and you should see what your available replacement patterns are. :)