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 6689915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:34:30+00:00 2026-05-26T05:34:30+00:00

I have my layout looking like this : <!doctype html> <!–[if lt IE 7

  • 0

I have my layout looking like this :

    <!doctype html>
    <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
    <!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
    <!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
    <!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
    <head>
      <meta charset="UTF-8">
      <title>My title</title>
      <%= stylesheet_link_tag "general" %>
      <%= javascript_include_tag "libs/jquery-1.5.1.min" %>
      <%= csrf_meta_tag %>
      <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

      <meta name="description" content="">
      <meta name="author" content="">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">

      <link rel="shortcut icon" href="/favicon.ico">

      <!--[if lt IE 9]>
      <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
      <![endif]-->
    </head>
    <body>
        <% if flash[:notice] %>
              <% if flash[:notice].kind_of?(Array) %>
                 <% flash[:notice].each do |id, value| %>
                    <p><%= id =%> <%= value =%> </p>
                 <% end %>
              <% else %>
                <p><%= flash[:notice] =%></p>
              <% end %>
        <% end %>
        <% if flash[:error] %>
          <p class="error"><%= flash[:error] %></p>
        <% end %>
        <!-- more content -->
        <div id="principal">

        <%= render 'layouts/header' %>
        <%= render 'layouts/banner' %>
            <%= yield %>
        <%= render 'layouts/footer' %>
        </div>

    </body>
    </html>

My problem is this line :

<%= render 'layouts/banner' %>

I have a banner in the top of my website. And i want to change it on each page. How can i overwrite this render from my index.html.erb view of my controller for example?

Thank you for help

  • 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-26T05:34:31+00:00Added an answer on May 26, 2026 at 5:34 am

    Have a look at content_for. For instance:

    layout

    <%= content_for :banner %>
    

    view

    <% content_for :banner do %>
      <h1>Banner for ThisParticularView!</h1>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a layout similar to this: <div id=...><img src=...></div> and would like to
I have a list like this: <html> <head> <link type=text/css rel=stylesheet href=testli.css> </head> <body>
I have an xml file like this. On vertical orietation everything is looking perfect.
I am looking of a good example for dynamic 3 columns layout like this
I have a layout 'profile' <div> <div> $this->action(action1, controller1, module1)<div> <div> $this->layout()->content </div> <div>
I have this layout that works correctly, a relative layout with a text view
I have a layout issue. What I do is this: create TableLayout in xml
I am trying to create a layout that will looking like: +---+--------+---+ | |
Initially I have this layout: <ul id=state_${abbr}></ul> on the jsp page and I need
I have a tablelayout in Android like this: 1) Row == IMAGEVIEW | TEXTVIEW

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.