i am trying to remove everything except the login box from the login page
i have a mod that redirects users to login page if they are not logged in
(which i can apply to all reas of site or specific areas if i choose)
i want to remove the header, nav bar, search bar and basket, basically everything except the login box from the login page
when i look at login.tpl, i cannot remove <?php echo $header; ?>
evrything else can be removed fine except the header stuff as it then screws with the page layout
i have a mod that redirects users to login page if they are not logged in
(which i can apply to all reas of site or specific areas if i choose)
i want to remove the header, nav bar, search bar and basket, basically everything except the login box from the login page
when i look at login.tpl, i cannot remove <?php echo $header; ?>
evrything else can be removed fine except the header stuff as it then screws with the page layout
If you are not able to completely modify the login page as you want it, then the last alternative is to create a new login page and then have the redirect for those not logged in, to go to that new login page rather than the one already in the shop.
i already have a redirect for non logged in users to go to login pageSelective555 wrote:If you are not able to completely modify the login page as you want it, then the last alternative is to create a new login page and then have the redirect for those not logged in, to go to that new login page rather than the one already in the shop.
your response does not really help as it seems i would just be creating a lot more work creating a new login page
but thanks for your time and response
all i am missing is the styling of the page once i remove header content
i remove the echo header line and then the layout/style of login page is gone
i will also need to remove header content from register page
easier explanation
all i am trying to do is remove/hide header content from specific pages
(top bar, search bar, nav bar and basket)
and maintain the page style and layout once i remove the first echo header line
all i am trying to do is remove/hide header content from specific pages
(top bar, search bar, nav bar and basket)
and maintain the page style and layout once i remove the first echo header line
You can try to add custom CSS at specific pages you want to hide header, footer, ...GoldenTongs wrote:easier explanation
all i am trying to do is remove/hide header content from specific pages
(top bar, search bar, nav bar and basket)
and maintain the page style and layout once i remove the first echo header line
For example
Code: Select all
<style>
header {
display: none;
}
</style>
Our free extensions:
Advanced Layout System, Display Raw Product Description in Product List, Minimum Order Amount Requirement, Add to Wish List Redirect for Anonymous Customer
The header.tpl file provides the opening <html> and <body> tags. The footer.tpl file provides the closing </body> and </html> tags. These are necessary. These must be included on your login page.
Edit catalog/controller/common/header.php and add the following:
somewhere suitable. Do the same in catalog/controller/common/footer.php.
In your catalog/view/theme/default/template/common/header.tpl, wrap the code you wish to exclude with:
and do the same in catalog/view/theme/default/template/common/footer.tpl
The "EXCLUDED CODE" will not display on the login page, but should still display on every other page.
Edit catalog/controller/common/header.php and add the following:
Code: Select all
$route = $this->request->get['route'];
In your catalog/view/theme/default/template/common/header.tpl, wrap the code you wish to exclude with:
Code: Select all
<?php if ($route != 'account/login') { ?>
--- EXCLUDED CODE ---
<?php } ?>
The "EXCLUDED CODE" will not display on the login page, but should still display on every other page.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Thanks for the inputfido-x wrote:The header.tpl file provides the opening <html> and <body> tags. The footer.tpl file provides the closing </body> and </html> tags. These are necessary. These must be included on your login page.
Edit catalog/controller/common/header.php and add the following:somewhere suitable. Do the same in catalog/controller/common/footer.php.Code: Select all
$route = $this->request->get['route'];
In your catalog/view/theme/default/template/common/header.tpl, wrap the code you wish to exclude with:and do the same in catalog/view/theme/default/template/common/footer.tplCode: Select all
<?php if ($route != 'account/login') { ?> --- EXCLUDED CODE --- <?php } ?>
The "EXCLUDED CODE" will not display on the login page, but should still display on every other page.
but all i am getting is
Notice: Undefined variable: route in etc. in header.tpl on line (wherever i place it)
am i being dumb and missing something ?
when you say add the first bit somewhere suitable is there somewhere specific you had in mind ?
opencarthow.com wrote:You can try to add custom CSS at specific pages you want to hide header, footer, ...GoldenTongs wrote:easier explanation
all i am trying to do is remove/hide header content from specific pages
(top bar, search bar, nav bar and basket)
and maintain the page style and layout once i remove the first echo header line
For exampleCode: Select all
<style> header { display: none; } </style>
i also tried this but it does not remove the navbar or top bar
it just removes the logo and cart and search bar
i can remove the navbar the same way by using .navbar
but am stuck trying to remove the top header bar
ALL DONE !!!!!
thanks to those who used their time to reply
i simply have
added under the first echo header line,
the right coloumn and breadcrumbs i will simply remove
now i have private site with just a simple login screen displayed
(also have redirect for user who are not logged in to redirect to login page)
until a user signs in
thanks to those who used their time to reply
i simply have
Code: Select all
<style>
.nav {
display: none;
}
.navbar {
display: none;
}
header {
display: none;
}
footer {
display: none;
}
</style>
the right coloumn and breadcrumbs i will simply remove
now i have private site with just a simple login screen displayed

(also have redirect for user who are not logged in to redirect to login page)
until a user signs in
Who is online
Users browsing this forum: Majestic-12 [Bot] and 9 guests