jubissi Posted March 2, 2015 Share Posted March 2, 2015 (edited) Hello guys! I want the first address at addresses list on "my account" do not be visible. I added a css property display:none for the class "first_item item box", but it just works for 1 address, when has more than 1 this address stay on class "last_item item box". I believe it can be solved by changing loop code on addresses.tpl for keep first address always on class "first_item item box" but I can't do it. This change is possible? Someone can help me? Thanks! Edited May 28, 2015 by jubissi (see edit history) Link to comment Share on other sites More sharing options...
fred-vinapresta Posted March 2, 2015 Share Posted March 2, 2015 In the addresses.tpl file, within the loop, you can put the code you want to show between: {if !$smarty.foreach.myLoop.first} {/if} Link to comment Share on other sites More sharing options...
jubissi Posted March 2, 2015 Author Share Posted March 2, 2015 Thank you fred for your reply! But I found a solution, I replaced this <ul class="{if $smarty.foreach.myLoop.last}last_item{elseif $smarty.foreach.myLoop.first}first_item{/if}{if $smarty.foreach.myLoop.index % 2} alternate_item{else} item{/if} box"> for this <ul class="{if $smarty.foreach.myLoop.first}first_item{/if}{if $smarty.foreach.myLoop.index % 2} alternate_item{else} item{/if} box"> and now, the address 1 isn't a class "last_item item box" and all addresses after 1 stay on class=" alternate_item box", and my css display works perfect. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now