x

Multiple Pages in Password-Protected Area of Site

I upgraded to Weebly Pro specifically so we could add a password-protected Member Log area to our website. The member area will have multiple pages. The user should only need to enter the password once when clicking the Member Login link. Once in that area, I need the pages that are in that area to show in the navigation sidebar. But if I "hide" them to keep them from appearing in the navigation sidebar from the public pages, they are also hidden within the member area.

Please tell me this is doable! I thought I would be able to add a text box to the side bar and add text that linked to the various pages in the member area. But I can't drag a text box to the sidebar.

Help!

1,905 Views
Message 1 of 18
Report
17 REPLIES 17

Hi @MooseTrax16,

this is quite doable but will require a little research and CSS on your end. I'll try and explain it.

Each item (page link) in the menu has its own unique ID tag with the HTML of your page. Weebly's software sets this behind the scenes, but we can find them...

Each page of your site has its own SEO>HeaderCode window. We'll use this to hide 'members' page links (menu items) in the non-member pages.

On my demo site I show the basics of how to find the menu item ID tags:

http://mjcsdemo.weebly.com/menu-editing.html

If you find the ID tags for the pages you want 'hidden', and then add something like the CSS below to each 'open' page, you will hide those menu items in those pages.

<style>
#pg846312871391605129  .wsite-menu-item {
 display: none;
}
</style>

Let me know if this sounds like something that is going to work for you? I can try and explain it in finer detail if needed.

Cheers, Mark

1,895 Views
Message 2 of 18
Report

Yes, Mark, this sounds like a workable solution. I have a tiny bit of experience with CSS (just enough to get me into trouble!), but I'm not afraid to try things. 

I haven't watched your demo yet, but if I'm understanding the idea, I will not check the box to hide any pages in the navigation. Then on the 4 public pages, I will add the code to hide the member-only pages.

Don't go too far away. 🙂 I am probably going to have more questions.

Thanks so much for offering a solution. I dreaded checking for replies today fearing the answer would be that it was not doable.

1,884 Views
Message 3 of 18
Report

Mark,

I was able to View Source in Google Chrome and obtain the page IDs for the 5 pages that are in the public area. But if I am understanding your instructions, what I really need are the page numbers of the pages in the member area. Right? And will I have to temporarily unhide all of those in the navigation in order to get the page numbers? I haven't yet created all of the pages, but I know what they will be. I could create them and get page numbers before adding content.

Once I have the page numbers for all of the pages in the member area--assuming that is what I need--where do I modify the CSS to hide them? I recall Weebly used to have a View CSS option, but I don't see that now. Do I have to do this through the Developer Tools in Google Chrome? If so, does it matter where I add the code? I'm afraid of messing something up, but I really need to make this work.

Thanks for any additional help you can offer.

1,871 Views
Message 4 of 18
Report

Hi @MooseTrax16,

It sounds like you're on the right track!

Yes - it's the member page menu item IDs that you need. You will need unhide them I think, at least for the time (hopefully only a couple of minutes) while you get the IDs. As long as they are set to 'password access' people won't be able to view the content even if they can see the link in the menu - so you're content should still be secure.

Once you've got your IDs, write the CSS similar to my initial post. You then need to add it to each of your public pages' header code window via this:

Pages>pageName>SEO Settings>HEADER CODE...

Make sure the Hide in Navigation box is unticked for all pages otherwise the members won't be able to see them either.

If you need more help let me know - I'm in Australia so it may be delayed because of time zones, but I generally get back within a few hours!

Cheers, Mark

1,859 Views
Message 5 of 18
Report

Thanks so much for your new reply, Mark!

I think my strategy will be to create all of my pages first without adding significant content. Once that's done and I have the page numbers, I can add the code to the public pages before I work on the content for the member pages.

So for EACH public page I would go to  the Header Code as you've shown (and which is currently blank) and add this for as many times as I have member pages to hide. It sounds easy enough to undo this if I mess things up, so I'll give it a go tonight.

Many thanks!

<style>
#pg##############1  .wsite-menu-item {
 display: none;
}
</style>
<style>
#pg##############2  .wsite-menu-item {
 display: none;
}
</style>
<style>
#pg##############3  .wsite-menu-item {
 display: none;
}
</style>
1,856 Views
Message 6 of 18
Report

Hi @MooseTrax16,

that all looks correct however you can reduce your CSS by keeping it all within one pair of style tags. For example:

<style>
#pg##############1  .wsite-menu-item {
 display: none;
}
#pg##############2  .wsite-menu-item {
 display: none;
}
#pg##############3  .wsite-menu-item {
 display: none;
}
</style>

Like you said - it is very easy to reverse if you have problems because we're adding it to the Header Code section rather than changing the sites CSS directly which can be 'problematic' if you're not fluent.

Cheers, Mark

1,837 Views
Message 7 of 18
Report

Hi Mark,

It worked, to a point. Here are the problems I'm having:

  • I cannot find a page number for the Member Home page, so I'm not able to include it in the code. Where the others have "<li id="pg..." that one has "<li id="active." (That is the landing page after someone enters the passsword.)
  • Below the menu there is an arrow as shown in the photo below.  If you click on the arrow, it opens a new menu with one of the pages that is to be hidden (Gallery) and its two subpages.

Any ideas where I might be going wrong? Thanks, again, for your help.

imageimage

1,821 Views
Message 8 of 18
Report

Hi @MooseTrax16

Just getting up here. Can you please send me the link to your website. You can do it via PM of you need to. I'll have a look at it later this morning when I get a moment at work.

Cheers, Mark

1,819 Views
Message 9 of 18
Report

issdar.org

1,816 Views
Message 10 of 18
Report

Hi @MooseTrax16,

the arrow can be removed with this added to the pages you want to hide it from...

<style>
.wsite-menu-mobile-arrow:before {
    display: none !important;
}
</style>

And this should remove the Member Home link in the menu...

#pg842455543420293550 .wsite-menu-item {
    display: none !important;
}

Let me know if that works.

Cheers, Mark

1,067 Views
Message 11 of 18
Report

Thank you, Mark! All of your suggestions have worked perfectly. I don't know what I would have done without your help!

I see one more thing I want to do (hide the public pages from the navigation menu in the member area), but I know how to do that thanks to your help.

Nancy

1,049 Views
Message 12 of 18
Report

I'm thrilled to hear that, Nancy ( @MooseTrax16 ),

More than happy to help, I'm glad I could point you in the right direction. Best of luck with the website.

Regards, Mark

1,043 Views
Message 13 of 18
Report

Again, thanks, Mark. I am going to start a new topic for managing the behavior in the navigation sidebar when there are subpages . . . just in case you have thoughts on that.

1,007 Views
Message 14 of 18
Report

Hi Mark,

I woke up this morning realizing why that one page was showing Active instead of the page number. Duh! Fixed that. The only remaining problem is the arrows in the menu bar. Of course, that gives anyone access to the entire member area.

Any ideas for fixing that?

Thanks much!

Nancy

1,064 Views
Message 15 of 18
Report

Hi @MooseTrax16,

In the post above your last one I put the CSS for both the problems you had for yesterday. Did you try the arrow fix that I suggested?

This post has spilt over onto two pages so maybe you missed my response as it was the first on the second page?

Can I suggest however that you still need to set all the members pages (including the ones we've hidden) to password access only. Otherwise, if someone happens to find a link from somewhere they'll be able to access it. What we've achieved is basically hiding the links, that's not as 'secure' as password protecting the pages. Once your members are logged in they won't need to put the password in again until they clear their web browser's cache.

Cheers, Mark

1,054 Views
Message 16 of 18
Report

Sorry, Mark. I missed your previous reply with solutions. I will apply the arrow solution right now and also PW protect all of the pages in the member area.

You are a lifesaver!

1,052 Views
Message 17 of 18
Report

I need to accomplish this, too. I've followed these instructions and can't seem to make it work. When I put the code in the Header Code section it doesn't do anything.

I've triple checked my page ids and tested the pages both logged in as a member of the site and not logged in as a member of the site.

To test - I put the code in the 'Header Code' sections of the first two public pages of my site. After clicking 'Publish' I opened the site in a new tab. I'm assuming it ought to work so that while I'm on those public pages which I applied the code to, the page I'm trying to hide shouldn't show up in the navigation. But it does.

Any insight?

970 Views
Message 18 of 18
Report