Hello there!
NOTES:
- I am running version 1.2.2 "Holetown" but will be upgrading it to 1.2.3 before the site goes live.
I've got a question regarding a project I am in the process of completing.
My client has a section of her website that is going to function as a Gift Registry. I've created one that I think works well and is simple to use. It utilizes the PageBlocks module (which is a great module).
Basically, the way it's setup (for anyone unfamiliar with a gift registry), my client logs into her backend and adds a block to the gift registry page. She then fills out the fields accordingly and submits them, which adds that person to the gift registry page. I've currently got room to add 5 items per person and the way I have added them is somewhat clunky (she doesn't have the ability to add as many as she wants. I have to alter the setup in order to allow her to add more than 5 items).
To the point. I want it to be setup so that if she only enters 3 items, the table rows and cells for those last 2 items won't appear. The same would apply if she added anything less than 5 items. I understand that I would have to use "if" and/or "foreach" statements of some sort, but when it comes to Smarty templates, I'm an absolute novice.
Here is the test site for reference and good measure: http://www.wrapprosatbbg.com/c2c/index. ... t-registry
If someone can help me figure this out, I will be forever in your debt. Thanks in advance.
Smarty assistance for a project
Smarty assistance for a project
Last edited by Daryn on Thu Mar 06, 2008 11:06 pm, edited 1 time in total.
Re: Smarty assistance for a project
You could do a count of the rows from the table, then use a Smarty counter to display the right number of rows.
Nullig
Nullig
Re: Smarty assistance for a project
That sounds logical. I'll have to do some research on how to do that, since I've never done it.