| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
#1
|
|||||||||
|
|||||||||
Edit Lists?
I'm pretty sure I asked this before.. but.
I found this. <ul class="account-links cf " IF="isAccountLinksVisible()"> <list name="layout.header.bar.links.newby" /> </ul> How do I edit that list. I'd like view cart and checkout added.
__________________
xcart 5.1.2 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Edit Lists?
You assign things to the list, and take them away.
Templates can assign themselves to lists, and so can PHP classes. Here is a class adding itself to a list: * @ListChild (list="center", zone="customer") And a template: * @ListChild (list="capost_create_return.form.columns", weight="15") In both cases you will see these declarations in the commented out section at the top of the file. I prefer to add templates/classes to lists by decorating the class or overriding the original template. You can also do a lot of heavy lifting right in your main.php file. To add a class or a template to a list, you wrap the call to the addClassToList() method in a function called runBuildCacheHandler() like this: Code:
You can remove a class from a list, and remove a template from a list in your main.php like this: Code:
You can move classes in lists: Code:
Move templates in lists: Code:
I took most of these examples from my Magnifico template, but you can see where I originally learned them in XLite\Core\Layout.php
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
#3
|
|||||||||
|
|||||||||
Re: Edit Lists?
seems a bit heavy handed to add a couple of links to a template. why is it done like this?
__________________
xcart 5.1.2 |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Edit Lists?
Quote:
This lets you have complete control! Modules can assign whatever they want to lists, create lists, take things away etc. I may have over-complicated my answer, I just wanted to arm you with all the info. If you want to just add a couple links, you can either create a new template with your links, and assign that template to the list using the very first method I described * @ListChild (list="capost_create_return.form.columns", weight="15") Or you can ovverride a template that is already added using your custom skin, and add the links there.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
#5
|
|||||||||
|
|||||||||
Re: Edit Lists?
Hey Mike,
If you had a little time, could you confirm that removeTemplateFromLists is working in 5.2.x please? My templates have started to mess up since my upgrade, have you faced any similar issues with the upgrade recently? -Niboon
__________________
X-Cart 5.1.10 X-Cart Next 5.2.1 Beta |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Edit Lists?
Niboon,
I just attempted to upgrade a test site to 5.2.X for the first time, and I am having some major issues. So I cannot confirm this yet. I have not recommended any of my clients upgrade to 5.2 yet, because I can't seem to get it to go smoothly on any of my test environments.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
#7
|
|||||||||
|
|||||||||
Re: Edit Lists?
I have found out what changed from version 5.1.x. for RemoveTemplateFromLists() in 5.2.x
Code:
Code:
It seems that backslash has stopped working and you HAVE to use forward slashes only.
__________________
X-Cart 5.1.10 X-Cart Next 5.2.1 Beta |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: Edit Lists?
I believe backslashes never worked on linux servers, only Windows understands that "\" is the same as "/" in file paths.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#9
|
|||||||||
|
|||||||||
Re: Edit Lists?
Yes, I should mention that I've only used Windows for X-Cart.
__________________
X-Cart 5.1.10 X-Cart Next 5.2.1 Beta |
|||||||||
|
|||
X-Cart forums © 2001-2020
|