Auto-update page name

Permalink Browser Info Environment
Firstly, amazing block! The only difficulty I have with this is that I'd like the link text to update when I edit the title of a page. Otherwise I'm left with having to go through every page with this block to manually update page titles.

Is it possible to make it so that manually-edited link texts do not update, but when it's left to default to the page title that gets updated?

Type: Discussion
Status: New
wildx22
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Hi,
That functionality is not part of the block, but it's a fairly easy modification. Edit this file:
/packages/manual_nav/blocks/manual_nav/view.php
Find this line:
<?php echo htmlentities($link->text, ENT_QUOTES, APP_CHARSET); ?>
...and change it to this:
<?php echo $link->cObj->getCollectionName(); ?>

Now the page title will be outputted, and the manually-entered text will be ignored. Unfortunately your users will still be shown the "title text" field when they edit block... this too can be changed but it's a but more complex than the one line for the view.

Hope that helps!

-Jordan

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.