Custom Login Page Created (No Autonav) - "with a catch"
Permalink
I have made a custom login page and it's working fine.
I have areas of a site that require a successful login in order to view, for instance the catalog.
If I go directly tohttp://www.mysite.com/login it pulls the correct login page in the theme with the Superfish nav and the Area Splitter at the top like it should. Greatness!
If I click on the link to the page that requires you to login to view I get the login page but "with a catch". The Superfish autonav isn't there nor the table that I have the login, catalog links and view cart links in as well.
Why is one login page working but when a page is requested that requires login it's not functioning at all? How do I fix this?
- or -
How would I be able to make all links to pages that require login a popup? This would solve the issues totally too.
To see the problem go this URL -http://www.signdetails.com/beta...
You'll see the Manufacturers login at the top and the Catalog, About Us and Contact Us links there as well. The Catalog link is what requires the login. If you click it, it takes you to the login page without navigation or the table at the top. I need the table at the top and the navigation in there as well.
If anyone has any ideas I am all ears.
Tim
I have areas of a site that require a successful login in order to view, for instance the catalog.
If I go directly tohttp://www.mysite.com/login it pulls the correct login page in the theme with the Superfish nav and the Area Splitter at the top like it should. Greatness!
If I click on the link to the page that requires you to login to view I get the login page but "with a catch". The Superfish autonav isn't there nor the table that I have the login, catalog links and view cart links in as well.
Why is one login page working but when a page is requested that requires login it's not functioning at all? How do I fix this?
- or -
How would I be able to make all links to pages that require login a popup? This would solve the issues totally too.
To see the problem go this URL -http://www.signdetails.com/beta...
You'll see the Manufacturers login at the top and the Catalog, About Us and Contact Us links there as well. The Catalog link is what requires the login. If you click it, it takes you to the login page without navigation or the table at the top. I need the table at the top and the navigation in there as well.
If anyone has any ideas I am all ears.
Tim
I have already added the theme_paths into the site_theme_paths.php file. That's working fine.
What I'm trying to do is have the default page features be placed on the page for the top table (Area Splitter Block) and the navigation (Superfish) upon clicking the Catalog link in the top table. If I go straight to the login pagewww.www.signdetails.com/beta/login... everything's fine but when I click Catalog in the top table it loads the Login page but without any blocks.
How do I go about getting the blocks to be shown on that page?
What I'm trying to do is have the default page features be placed on the page for the top table (Area Splitter Block) and the navigation (Superfish) upon clicking the Catalog link in the top table. If I go straight to the login pagewww.www.signdetails.com/beta/login... everything's fine but when I click Catalog in the top table it loads the Login page but without any blocks.
How do I go about getting the blocks to be shown on that page?
Your beta page looks like it is constructed as a regular page with a login block added (please correct me if I have guessed wrong on this). It will come from the file default.php or sidebar.php in your theme.
The login page is a single page, so is filled in to the middle of the file view.php in your theme.
You have been styling (it looks good) a regular page with a login block and menus etc. By doing this in page defaults, you have carried this menu etc across to other regular pages that share the same defaults. But single pages do not share these defaults. As noted above, they come from a different php template file in your theme. When 'contacts' detects a permission is required, it is loading from the single page.http://www.concrete5.org/documentation/developers/pages/single-page...
If you put your navigation block into a gloal scrapbook, you can then add code to render that scrapbook block within the view.php single page file in your template.
As an aside, looking at the html source for your pages, you have a problem that lots of stuff that should be in the html header is getting output within the html body. Some browsers will cope with this, but it could give unpredictable results, javascript errors, unneccessary double downloads, poor SEO ranking.
The login page is a single page, so is filled in to the middle of the file view.php in your theme.
You have been styling (it looks good) a regular page with a login block and menus etc. By doing this in page defaults, you have carried this menu etc across to other regular pages that share the same defaults. But single pages do not share these defaults. As noted above, they come from a different php template file in your theme. When 'contacts' detects a permission is required, it is loading from the single page.http://www.concrete5.org/documentation/developers/pages/single-page...
If you put your navigation block into a gloal scrapbook, you can then add code to render that scrapbook block within the view.php single page file in your template.
As an aside, looking at the html source for your pages, you have a problem that lots of stuff that should be in the html header is getting output within the html body. Some browsers will cope with this, but it could give unpredictable results, javascript errors, unneccessary double downloads, poor SEO ranking.
The login page itself can be seen fromhttp://www.signdetails.com/beta/login.... This page is located in the /beta/single_pages folder (not beta/concrete/single_pages).
The page that needs the work is when I click on the catalog link at the top and the served page is the login.php page. However, when the CMS requests that, in order to view the Catalog page, it serves a page that's devoid of the headerNav it seems because all of the block that were in the headerNav are missing. The header.php is still calling the Header itself along with all of the blocks and divs inside it. It's just that this page isn't functioning totally as it should.
I just need the nav and the table at the top to be on there and can't for the life of me modify the code to make it so...
The page that needs the work is when I click on the catalog link at the top and the served page is the login.php page. However, when the CMS requests that, in order to view the Catalog page, it serves a page that's devoid of the headerNav it seems because all of the block that were in the headerNav are missing. The header.php is still calling the Header itself along with all of the blocks and divs inside it. It's just that this page isn't functioning totally as it should.
I just need the nav and the table at the top to be on there and can't for the life of me modify the code to make it so...
Yes, I had already looked at these pages and their source, for both your new styled login and the login without the header navigation, which is how I also spotted the erroneous header content in the document body.
You never actually enter an url with /single_pages/. Wherever in the site pages a single page is required will get mapped to use the single page view.php as a container. In your case, to the 'forbidden' catalog page that shows a login. As I said in my last post, the file you need to add the menu to is 'view.php' in your theme (ideally by mapping the theme to an override rather than modifying it directly)
You never actually enter an url with /single_pages/. Wherever in the site pages a single page is required will get mapped to use the single page view.php as a container. In your case, to the 'forbidden' catalog page that shows a login. As I said in my last post, the file you need to add the menu to is 'view.php' in your theme (ideally by mapping the theme to an override rather than modifying it directly)
Yeah, this is really confusing. There's 2 (or potentially 3) different pages that all seem like they are the "login" page. The first is the login page, the second is the page_forbidden page. The third could be any page that you've added the login block to (as John mentioned).
So... you probably added the nav blocks to the /login page of your site, but not to /page_forbidden. So log in as the admin and manually navigate to the /page_forbidden page, then edit the page and add the blocks there.
(And it sounds like you already did this, but just to be sure... make sure you've set the page_forbidden page to have your theme in config/site_theme_paths.php).
So... you probably added the nav blocks to the /login page of your site, but not to /page_forbidden. So log in as the admin and manually navigate to the /page_forbidden page, then edit the page and add the blocks there.
(And it sounds like you already did this, but just to be sure... make sure you've set the page_forbidden page to have your theme in config/site_theme_paths.php).
I'm truly not intending to be difficult. I'm confused myself and I've used c5 for almost a year now with numerous fully custom sites designed and I've never seen this not work either.
The site_theme_paths is modified properly, the login page at /login is as it should be and the other pages are added into the site_theme_paths as well (including the forbidden_page).
But as soon as you navigate to "mysite.com/beta/catalog" without being logged in you come to a screen just like the "mysite.com/beta/login" but without the nav or the top table. Try it. I've went over everything I know to do.
I would've gone directly to the "mysite.com/beta/catalog" and edit to add the blocks if I could get there without being logged in to do it. I'm lost is all.
The thing that blows my mind is that when I click to go to the catalog I go to the Login single page with the correct theme, but when I go to the Catalog link or another page you have to be logged in to view the block aren't there. I don't know what else to say or what else to do about the issue.
It should be the exact same page. Unless I go in and delete the blocks that are in the working login page (mysite.com/beta/login) and hardcode blocks into the login.php in the "root/single_pages" folder I guess this might be a blunder on a beautifully designed site. That's my last resort.
Do you dudes suggest just that?
All the best,
Tim
The site_theme_paths is modified properly, the login page at /login is as it should be and the other pages are added into the site_theme_paths as well (including the forbidden_page).
But as soon as you navigate to "mysite.com/beta/catalog" without being logged in you come to a screen just like the "mysite.com/beta/login" but without the nav or the top table. Try it. I've went over everything I know to do.
I would've gone directly to the "mysite.com/beta/catalog" and edit to add the blocks if I could get there without being logged in to do it. I'm lost is all.
The thing that blows my mind is that when I click to go to the catalog I go to the Login single page with the correct theme, but when I go to the Catalog link or another page you have to be logged in to view the block aren't there. I don't know what else to say or what else to do about the issue.
It should be the exact same page. Unless I go in and delete the blocks that are in the working login page (mysite.com/beta/login) and hardcode blocks into the login.php in the "root/single_pages" folder I guess this might be a blunder on a beautifully designed site. That's my last resort.
Do you dudes suggest just that?
All the best,
Tim
I don't think you're being difficult -- it's super confusing. I think what you need to do is be logged into your site and then go to this address:
mysite.com/beta/page_forbidden
...and then edit the page to add the nav blocks you want.
I could be wrong, but you should at least try that first, as I think it's the most likely possibility at this point.
mysite.com/beta/page_forbidden
...and then edit the page to add the nav blocks you want.
I could be wrong, but you should at least try that first, as I think it's the most likely possibility at this point.
I tried that, but to no avail. Is there any way I can redirect links to pages that require you to be logged in to another page (not a single page) and place the login block on it?
Hmm... okay. Well I guess I'm still not clear on what the scenarios here are. When I go tohttp://signdetails.com/beta/login... ~OR~http://signdetails.com/beta/catalog/... , I see the same page (with the dropdown menu).
I actually fixed the issue by hardcoding the blocks in the pages with absolute positioning. Worked fine. I really appreciate your help man!
I tried that, but to no avail. Is there any way I can redirect links to pages that require you to be logged in to another page (not a single page) and place the login block on it?
I tried that, but to no avail. Is there any way I can redirect links to pages that require you to be logged in to another page (not a single page) and place the login block on it?
Hello,
I also have this issue. I have altered the page forbidden and changed the config/site_theme_paths.php accordingly. However, like Tim, when a user is not logged into the site, and tries to access a page for which they must be logged in, they are taken to a page that is drawn from single_pages/login.php, but which doesn't have all the blocks added that the login.php page does have:
e.g.
http://www.ecossedirect.com/newsite/login...
http://www.ecossedirect.com/newsite/dashboard...
Any fixes that don't require hardcoding would be much appreciated.
Kind regards.
I also have this issue. I have altered the page forbidden and changed the config/site_theme_paths.php accordingly. However, like Tim, when a user is not logged into the site, and tries to access a page for which they must be logged in, they are taken to a page that is drawn from single_pages/login.php, but which doesn't have all the blocks added that the login.php page does have:
e.g.
http://www.ecossedirect.com/newsite/login...
http://www.ecossedirect.com/newsite/dashboard...
Any fixes that don't require hardcoding would be much appreciated.
Kind regards.
Just to add, I have tried this of a few C5 sites and have the same problem.
Set permissions on a page so guests can not view it... when the user does try to go to that page it just displays my custom template with the login form and does not pull in any of the blocks I added to the page.
Set permissions on a page so guests can not view it... when the user does try to go to that page it just displays my custom template with the login form and does not pull in any of the blocks I added to the page.
I know that altering the view.php page in themes/ directory has an effect on the erroneous login pages, however, for these problem login pages to look as expected, either the single_pages/login.php or themes/xxx/view.php would have to have the blocks required to be displayed hardcoded, which isn't ideal.
In particular, setting the paths to your custom login in /config/site_theme_paths.php
The login page will is a single page, so will get its top and tail from view.php in your theme (as opposed to default.php or sidebar.php etc.)