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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:52:02+00:00 2026-05-24T17:52:02+00:00

In my rails app, I want to render certain pages within a lightbox but

  • 0

In my rails app, I want to render certain pages within a lightbox but the issue is that my main navigation (header/footer, etc) is all included within my application.html.erb layout. I have a ton of pages and the majority of those pages use the navigation. If I remove the navigation from the application.html.erb, I’m going to have to replicate the header and footer code in almost all my view files, save 4-5. How can I specify that I only want certain views to use a different layout, where do I put those layout files and how do I need to name those files?

For reference, this question comes close but doesn’t quite answer my question. Rails layouts per action?

I would like to know specifically where those layouts need to be saved and how they need to be named.

  • 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-24T17:52:02+00:00Added an answer on May 24, 2026 at 5:52 pm

    Put the navigation inside layouts/application.html.erb, so it will be the default layout to render. Put the lightbox code to the layouts/lightbox.html.erb, and for the lightbox pages, add

    render :layout => 'lightbox'
    

    to their actions.

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

Sidebar

Related Questions

I want to setup a rails app on heroku that is part of a
I have a rails app that I'm going to host on engineyard and want
render @some_object will render Rails.root/app/views/some_objects/_some_object.html.erb Now I want to handle which partial will be
In a Rails app I have helper methods that render html snippets, e.g. Twitter
In my Rails app I want users to be able to input video links
I have a rails app and I want to deploy it on a server
I am writing a Ruby on Rails app and I want a method to
I want to use mysql with a rails app (I have never used mysql
I want to integrate chargify to my rails app. I have user object and
I have a Rails app (running 3.2.2) and I want to cache my users'

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.