Display a chosen topic name in the Page List block

Permalink 1 user found helpful
Hey all - Wondering if anyone has done this in 5.7.

If you use a topic list to filter a page list, is it possible (or fairly easy to do) to display the name of the chosen topic as a header/title in the Page List that gets filtered?

Any help appreciated.

juddc
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi juddc,

Are you looking to do something similar to the Portfolio page in the Elemental sample content? If not, can you include more information and a mockup of what you are trying to make.
juddc replied on at Permalink Reply 1 Attachment
juddc
I mocked up what I'm trying to accomplish. It seems like a no-brainer. See attached Image.
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
@juddc

The "archive" custom template for the Page Title block can be customized to do this. An example of its use is in the blog page of the sample content.

- copy archive.php
concrete\blocks\page_title\templates\archive.php
- paste it into application\blocks\page_title\templates
application\blocks\page_title\templates\archive.php
- change the name of archive.php to "topic_title.php"
application\blocks\page_title\templates\topic_title.php
- open topic_title.php and change one line of code
from:
$title = t('Topic Archives: %s', $currentTopic->getTreeNodeDisplayName());

to:
$title = t('%s', $currentTopic->getTreeNodeDisplayName());

Add the Page Title block, with the Topic Title custom template, above the Page List block that is filtering the topics. It should list the current topic being filtered.
juddc replied on at Permalink Reply
juddc
That works brilliantly - Thank you.
siton replied on at Permalink Reply
siton
Very good topic. thanks.