WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Show menu only on specific pages
marmot:
Hi,
--- Quote from: flip on August 01, 2012, 07:07:49 PM ---There is no redirect to:
http://www.zalando.de/error404.html
--- End quote ---
that's fine but how (from the programmers view) is the call for the error page done in your case?
regards
flip:
Hello Marmot,
I'm using simple htaccess rules:
ErrorDocument 400 /en/error/400.php
ErrorDocument 401 /en/error/401.php
ErrorDocument 403 /en/error/403.php
ErrorDocument 404 /en/error/404.php
ErrorDocument 500 /en/error/500.php
It's not redirecting to the error pages. The error pages are opened under the link which doesn't exist.
Philip
flip:
@Argos: I show the main menu on the error page as well like Zalando does but I don't want to show my sub-menu on these pages.
marmot:
Hi,
--- Quote from: flip on August 02, 2012, 05:41:12 AM ---It's not redirecting to the error pages. The error pages are opened under the link which doesn't exist.
--- End quote ---
ok, had a small error in my thoughts ;). Besides the possibilities mentioned above it would be possible to do the redirect this way:
--- Code: ---ErrorDocument 404 /en/error/404.php?redirect=1
--- End code ---
and your existing condition for the menu call has to be extended by:
--- Code: ---&& !isset($_GET['redirect'])
--- End code ---
regards
Argos:
--- Quote from: flip on August 02, 2012, 05:48:12 AM ---@Argos: I show the main menu on the error page as well like Zalando does but I don't want to show my sub-menu on these pages.
--- End quote ---
Try this:
--- Code: ---<?php
if (PAGE_ID!=0) {
echo "your-menu-call-here";
}
?>
--- End code ---
Or this:
--- Code: ---<?php
if (PAGE_ID>0) {
echo "your-menu-call-here";
}
?>
--- End code ---
Not tested...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version