I ran into a case that I needed to alter the view title programmatically that was used in a views reference field. I need to look at what view it was and check the arguments before I change the title. Currently, there is no way to do it. It would be nice if we run hook_preprocess_viewsreference__view_title() we can change the title based on the view.

Comments

albertski created an issue. See original summary.

albertski’s picture

Status: Active » Needs review
StatusFileSize
new577 bytes

Status: Needs review » Needs work
recrit’s picture

The attached patches are for 1.x and 2.x respectively and add the #view to the theme call and common views theme suggestions for "viewsreference__view_title"

recrit’s picture

recrit’s picture

NewZeal’s picture

Patch applied and pushed to dev. Please test.

  • New Zeal committed 68f9726 on 8.x-1.x authored by recrit
    Issue #2901356 by recrit, albertski: Pass view to render array
    
NewZeal’s picture

Status: Needs review » Fixed
NewZeal’s picture

Status: Fixed » Closed (fixed)