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

  • SEARCH
  • Home
  • 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 1082101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:15:14+00:00 2026-05-16T22:15:14+00:00

I have a fresh CakePHP 1.3 install and it currently has one layout. I

  • 0

I have a fresh CakePHP 1.3 install and it currently has one layout. I am about to add a few more but I don’t want to have to keep coping and pasting the Header and footer in to each layout.

At first I thought that I could do this with an Elements, but it does not seem to render the Configure::read('var_name'); chunks while in an element.

My other thought was to create a common layout and use lots of variables to add and remove sections from the screen depending on what type of user they are… but this would be troublesome to say the lest.

My question is:
Is a way to include a header/footer section in to a layout while getting the Configure::read() function to output text?

  • 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-05-16T22:15:15+00:00Added an answer on May 16, 2026 at 10:15 pm

    I still think that elements are the right way to go for this (shared view snippets, FTW). I have to admit that I’m a little surprised that elements can’t read from the Configure class, but I’ll concede that I haven’t tried it. If that really won’t work, then try passing the values directly to the element:

    <?php echo $this->element( 'partial_name', array( 'var_name', Configure::read( 'var_name' ); ?>
    

    In the element, you should then be able to access the variable simply as $var_name. For more on passing variables to elements, take a look at the [Passing Variables into an Element](Passing Variables into an Element) section of the element documentation.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 sql scripts, one is for fresh install and the other one
I hope it's a simple one. I have a fresh install of Snow Leopard.
I have a fresh install of phpmyadmin on my vpn server. It has some
I have a fresh install of WordPress 3.1.2 (not upgraded but installed fresh), containing
I have a fresh install of CakePHP 1.3.4 Stable. I created a very simple
I try to update a project from SVN (I have a fresh install of
I'm pretty fresh to database handling, but now completely without experience. However, I have
I have a fresh install of the latest Eclipse Helios for Java EE development
I have a fresh install of IIS 7 - I just added Web Platform
I have a fresh install of Zend Framework v1.10.5 on my application server. The

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.