Zend Framework

Allow HeadTitle() to be used in multiple locations

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Not an Issue
  • Affects Version/s: None
  • Fix Version/s: 1.8.0
  • Component/s: Zend_View
  • Labels:
    None
  • Fix Version Priority:
    Nice to Have

Description

As HeadTitle() produces <title> tags, it's not possible to use in in other locations outside <head>, it would be great if that could be possible.

Mailing list reference: http://www.nabble.com/Re%3A-ZF-1.5PR-comments-p15162869s16154.html

Thank you

Activity

Hide
Matthew Weier O'Phinney added a comment -

Scheduling for next mini release

Show
Matthew Weier O'Phinney added a comment - Scheduling for next mini release
Hide
Simon Corless added a comment -

I don't know how you are planning to do this but to be able to specify a tag would be good... Maybe boolean would add or not add title tag, or a string would become the tag.

echo $this->headTitle(true);
// <title>My Title</title>

echo $this->headTitle(false);
// My Title

echo $this->headTitle('h2');
// <h2>My Title</h2>

And / Or implement another placeholder helper for titles, which is then extended by headTitle and in turn can be extended by our own classes. I use a pageTitle helper which is basically a duplicate of headTitle, if this could be based on a concrete implementation of a Title Helper it would make it all work more seamlessly.

Show
Simon Corless added a comment - I don't know how you are planning to do this but to be able to specify a tag would be good... Maybe boolean would add or not add title tag, or a string would become the tag. echo $this->headTitle(true); // <title>My Title</title> echo $this->headTitle(false); // My Title echo $this->headTitle('h2'); // <h2>My Title</h2> And / Or implement another placeholder helper for titles, which is then extended by headTitle and in turn can be extended by our own classes. I use a pageTitle helper which is basically a duplicate of headTitle, if this could be based on a concrete implementation of a Title Helper it would make it all work more seamlessly.
Hide
Ralph Schindler added a comment -

This sounds like it should come in the form of a Zend_View_Helper_Title helper. This is not within the scope of the headTitle() helper. Please create a proposal. Perhaps ping Jon Whitcraft (sidhighwind) as he has invested interest in the Zend_View Helpers and might be interested in creating this.

Show
Ralph Schindler added a comment - This sounds like it should come in the form of a Zend_View_Helper_Title helper. This is not within the scope of the headTitle() helper. Please create a proposal. Perhaps ping Jon Whitcraft (sidhighwind) as he has invested interest in the Zend_View Helpers and might be interested in creating this.

People

Vote (4)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: