How do I add a link to the home page in code.
I know it's something like:
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
But what are the variables?
Ta. D.
How do I add a link to the home page in code.
I know it's something like:
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
But what are the variables?
Ta. D.
It really depends on what you want to add.... if you're wanting to add a link to a non-Zen-Cart page, then simply follow the example without the PHP portion:HTML Code:<li><a href="http://url-to-go-to.com/path/etc.html">This is the name of my new link. Click me now!</a></li>
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Yes, I guess I could just do it the easy way by putting:
But I want to add a link to the home of the site in PHP. If the 'Text' part was 'Home' what would happen when if I suddenly needed a second language. 'Home' should come from a language file somewhere shouldn't it? Does a variable exists for this? Can I define one? Where? And can the url part be built in the same way as all the others? ie using<li><a href="url">Text</a></li>What would the variables be for that?PHP Code:
zen_href_link(FILENAME_LOGOFF, '', 'SSL');
Sorry, to be picky. D.
I believe what you want is:
<?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?>
<?php echo HEADER_TITLE_CATALOG; ?></a>
Of course, zillions of permutations of this exist, but you get the idea.
Good luck.
Scott
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
That will do nicely. Thank you very much.
I was hoping it would be more on the lines of:
for the url. But the [FONT="Courier New"]HEADER_TITLE_CATALOG[/FONT] was exactly what was needed for the text.PHP Code:
zen_href_link(FILENAME_MAIN_PAGE, '', 'NONSSL');
Cheers, D.
zen_href_link(FILENAME_DEFAULT);
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
FILENAME_DEFAULT ! Hurrah! I had tried all sorts of variable names. Thank you so much. D.
Bookmarks