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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:43:10+00:00 2026-06-05T11:43:10+00:00

Let’s suppose I have a web application made with Backbone, which use Backbone.Router for

  • 0

Let’s suppose I have a web application made with Backbone,
which use Backbone.Router for routing client-side pages.

Let’s suppose the page layout looks like this:

link_1 |
link_2 | Right
link_2 |  

And the Router is the following:

routes: {
    'link_:id': 'renderRight'
}

When the user click on l1, l2 or l3 it opens the view on the Right part of the window.
But let’s suppose the user want to see the Right part in a new window.
For how the router works, it will render the full Vies (right and left).
How can I fix this problem?

P.S.:
For creating the left part containing the link (LinkView) I have the following ContainerView which creates different instance of LinkView (one for each link):

var ContainerView = Backbone.View.extend({

   // ContainerView Left Part

    addAll: function ()
    {
        this.collection.each(this.addOne);
    },

    addOne: function (task)
    {
        var view;
        view = new LinkView({ 
            model: task
        });

        this.$("#linkContainer").append(view.render().el);
    },

    // other codes

});
  • 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-05T11:43:11+00:00Added an answer on June 5, 2026 at 11:43 am

    You will have to find a way to differentiate between new window, and an existing document with a menu.

    The easiest way i can think of to do this is by using Backbone.history. When you are on the root path, you can render the menu and create an el for the right part to attach to. Then when a linked is clicked, you catch it and have the app router navigate to your link route. Here you can have your renderRight route check for an existence of an a right-el and attach to that, if not then this is a new page, so create an el and attach. This solves your trouble on a right-click new-page or a direct navigation to root/link:id scenario as your left menu wouldn’t be existing and solve your problem of having the view render full page without it.

    • root – render menu, and create right el.
    • link_:id – check for existence of el, if not create and attach to that.

    edit: here’s a sample of what i mean

    var Application = Backbone.Router.extend({
    
        routes: {
            "": "root"
            'link_:id': 'renderRight',
        },
    
    
        root: function() {
            //rednder link container
            var menu = new ContainerView();
            $('body').append('<div id="linkContainer"/>','<div id="rightContainer"/>'); //create left and right container
            menu.render();
            //render initial view of right container etc..
    
    
        },
    
        renderRight: function () {
    
            if ($('#rightContainer').length == 0) $('body').append('<div id="rightContainer"/>');  //check if a rightContainer is available if not create one
            //render right container to  #rightContainer
        }
    
    });
    var app = new Application();
    Backbone.history.start();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have two assemblies: BusinessLogic and Web. BusinessLogic has an application setting
Let's say I have an facebook application running using the JS SDK. First user
Let's suppose I have an XML file like this: <?xml version=1.0 encoding=ISO-8859-1?> <MIDIFile> <Event>
Let's suppose I have a Discussion model, and that a discussion can be tagged.
Let's suppose I have this piece of code. foreach(string value in myList) { string
Let's say I have a dataset, which can be neatly classified using weka's J48
Let's say I'm writing a Windows Forms (.NET Framework 3.5) application which shows the
Let's say I'm building a data access layer for an application. Typically I have
Let's say you have a class called Customer, which contains the following fields: UserName
Let's say I have an string variable called *magic_string* which value is set to

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.