Forum

Thread tagged as: Suggestions

Being able to use `append` without chars and word

Hi,

I have a suggestion regarding append: it would be useful to be able to use it independently from chars and words. I was trying to use it in the context of SEO with page attributes, for a title to append a string after what the content manager would enter in the CMS. Something like this:

<perch:pages id="page_title" type="text" label="SEO Title" append=" – Name of the website" />

Just a suggestion.

Cheers!

Robin Pick

Robin Pick 5 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Why not just put that after the tag?

In this case, it is because I'm using a bunch of <perch:pages /> tags (for title, description, etc.) in a single master SEO template, that I use then separately in the head of my page:

<?php $title = perch_page_attribute('page_title_fr', array('template' => 'seo.html'), true); ?>
<title><?php echo $title ?></title>

Not a big deal to add it after the perch_page_attribute anyway but I thought that it could be useful in some instances to add a value through append.

Drew McLellan

Drew McLellan 2638 points
Perch Support

The value is appended as the that is output, so it would be functionally the same. :)