Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7832729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:22:40+00:00 2026-06-02T12:22:40+00:00

How would I assign a page title once in the bootstrap (so I don’t

  • 0

How would I assign a page title once in the bootstrap (so I don’t have to do it in each controller)? Is there a link that will point me in the right direction?

Is using the bootstrap the correct way?

I currently have this in each controller:

public function indexAction()
{
    $this->view->title = 'Cut It Out';
}

layout.phtml has this:

<h1><?php echo $this->escape($this->title); ?></h1>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T12:22:54+00:00Added an answer on June 2, 2026 at 12:22 pm

    You could use a view helper for this to echo the title into your layout script in layouts/layout.phtml.

    Create the file /application/views/helpers/SiteTitle.php :-

    <?php
    class Zend_View_Helper_SiteTitle extends Zend_View_Helper_Abstract
    {
        public function siteTitle()
        {
            $siteTitle = getTitleFromDbSomehow();
            return $this->view->escape(siteTitle);
        }
    }
    

    Then in your layout head section you would have:-

    <title><?php echo $this->siteTitle(); ?></title>
    

    If you want it in the body somewhere:-

    <h1><?php echo $this->siteTitle(); ?></h1>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Customers table and would like to assign a Salesperson to each
I have a ViewPager with 3 pages. In each page, I would like to
I have a cursor which is returning certain value. I would like to assign
I'm trying to assign a function for each element in a loop. I would
I have a jpeg file saved in a string. I would like to load/assign
I have a page that uses Ryan Bates nested_form plugin . The plugin is
I currently have a div on my page that I have given a background
I have a page that needs to accept .csv files with no predefined layout.
I have a MySQL result set $fields_num = mysql_num_fields($result); I would like to assign
Basically, I want to assign an event handler to each page number (in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.