Creating custom buttons linking to extra pages
I have read about this version of Zencart using CSS buttons now (I am in the process of setting up a new version of our v1.54 site that badly needed an update). But it's not clear to me what the actual steps are. Lets say I want to add a couple of buttons to the front page that link to a Store Locator page and the About Us page. Is there documentation that would walk me through that or am I better off using a template that offers buttons?
Re: Creating custom buttons linking to extra pages
Re: Creating custom buttons linking to extra pages
Thank you for the links, if I look at the information sidebox template it has much less content than for example the tpl_index_default.php file (since I want the links on the main page I assume this would be the file to add it to). Would the link, in this case the documentation example
PHP Code:
$content .= '<li><a href="' . zen_href_link(FILENAME_EZPAGES,'id=9') . '">' . "My new page" . '</a></li>';
be placed after all of the center boxes?
Re: Creating custom buttons linking to extra pages
The placement is your call. Put them where ever you like.
If you only want them on the main page, you might consider using the main page define page for the buttons, but remember that it's HTML only and not PHP.
Re: Creating custom buttons linking to extra pages
So I would insert it more like this;
HTML Code:
<a href="' . zen_href_link(FILENAME_EZPAGES,'id=9') . '">' . "Store Locator" . '</a>
And is there a section in the docs on the CSS buttons being added in an HTML page?
Re: Creating custom buttons linking to extra pages
Ok so I did get the button to show up using this in the define pages editor (main page);
HTML Code:
<button class="button" onclick="location.href='index.php?main_page=index&cPath=1';">About Us</button>
Now I just have to adjust the CSS style to suit my needs.
Re: Creating custom buttons linking to extra pages
Great! Hope the upgrade goes well and gets deployed soon.