Jump to content

Title field and SmartyPants


Marty Walker
 Share

Recommended Posts

Hi,

Is it possible to run a field in a template through one of the text formatters? I have title like this: This is 'Closed' - which I would like to have curly quotes. If I add SmartPants to the title field in the admin there's no effect.

But if I include a PHP version of SmartyPant (http://michelf.ca/projects/php-smartypants/), and have setOutputFormatting to false I can do this.

<?php
	$page->of(false);
	$my_text = SmartyPants($page->title);
	echo "<p>" . $my_text . "</p>";
?>

Just wondering if there's a 'PW' way to do it.

Regards

Marty

Link to comment
Share on other sites

Textformatters are intended for front-end rather than back-end. So you won't see the results of a Textformatter in the admin side. However, if you apply the SmartyPants Textformatter to any text field (Fields > edit field > Details > Text formatters), you should see the results on the front-end. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...