Re: html <a name=" to define page
ok, the problem is that it doesn't work with the extra page editor, like delfine page 4, but with the page at the end of the main page the code works fine. I need to put it in the final page 4 by chance I did a test in the main page and does it work like never?
Re: html <a name=" to define page
Ok, few things. This is not a "Zen Cart" issue. We are talking about html on the page.
If the html is not right (perhaps doesn't pass validation) then it could cause things like this not to work. There has been a request to identify where this is being tried (ie. Web page) so that more specific assistance can be provided.
Re: html <a name=" to define page
hi, the code is right, but I do not know why it is not going with some delfine page, as I said if I put the code on the delfine main page it works fine, on delfine page 4, 3.2 it does not work not. You can do a test if you have a test site
Re: html <a name=" to define page
Quote:
Originally Posted by
diamond1
hi, the code is right, but I do not know why it is not going with some delfine page, as I said if I put the code on the delfine main page it works fine, on delfine page 4, 3.2 it does not work not. You can do a test if you have a test site
It's unfortunate that in trying to make yourself understood that the time needed to understand what others have suggested hasn't been taken nor have the requests to provide specific information been answered so that a specific solution could be provided.
So... looks like someone needs to provide basic html training on a topic that is basically outside the scope of Zen Cart specific issues though will provide a Zen Cart solution to make it possible to repeat this action anywhere on your site. Oh, and yes this is a bit of "tough love"...
So, an web page is located on the internet. Links that are provided on the page can be fully written (http :// domain / sub-directory / file ? parameters), can be relative to the protocol used to access the page ( // domain / sub-directory / file ? parameters) or relative to the base page (file ? parameters).
The link is generated from what is provided in the href content and if it is not a full link or one relative to the protocol method, then it will be relative to the base page.
If you look at the source code of whatever page you are on (ie. page_2) and look for base href, you will see that the link will look like http or https // domain / sub-folder /. (if there is no sub-folder then the link will end at the slash after domain.
Thus, with your href tag being something like: href="#sample1" the resulting "link" is http or https // domain / sub-folder / #sample1... Therefore, the browser will try to navigate to the page defined which is the root of the site and then from there try to go to the id/name defined which would try to be sample1 if it exists.
If, however, the link had all of the content to indicate to stay on the same page but reference an item on the page, then no departure from the current page would occur, the browser will show the new link location in the web page address and even the back button being pressed on the browser would modify the url.
So. If in your "define" you added:
Code:
href="<?php echo zen_href_link((!empty($_GET['main_page']) ? $_GET['main_page'] : FILENAME_DEFAULT), zen_get_all_get_params(array('main_page')), $request_type); ?>#sample1"
Then the link would be generated using the Zen Cart process for a page recognized/defined in Zen Cart, though it does also depend on the url having a main_page parameter on it. That last part is important in relation to the destination as if there is no main_page, then the home page will be used/loaded.
So, as previously suggested, need to add the path to the url of the catalog path, whether it is fully defined or just hard-coded to match the current path.
Because of the absence of specific information, others helped by showing what they did for their specific situation rather than guessing at what you were doing or wanted. Ie. They helped as far as you helped them help you. Again "tough love".
Re: html <a name=" to define page
Now it works I do not understand why I have to give it url href = "<? Php echo zen_href_link ((! Empty ($ _ GET ['main_page'])? $ _GET ['main_page']: FILENAME_DEFAULT), zen_get_all_get_params (array ( 'main_page')), $ request_type);?> # sample1 "
"Tough Love"
Thank you MC12345678
Resolved!