3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 619 Views |
-
Multiple custom variables on a template/layout

9 March 2012 at 7:27am
I'm looking for the best but simplest way to have multiple custom variables on a page layout, the variable output would different depending on the page.
For example three variables; name, price, sku number. There are three products, each product needs those variables. However each of those variables output would be different depending on the product.
I've looked into template variables.
function MyCustomValue() {
return "Hi, this is my site";
}However it doesn't seem efficient since I would have to create a custom value for each page. A custom field box when creating a page in the admin panel would be prefered; in the product layout where ever $Price is placed it would output the value that was typed in the custom field, I imagine this is difficult to create. I have briefly looked into dataobjects, I can't seem to wrap my head around them. What is the best solution for what I want to do?
-
Re: Multiple custom variables on a template/layout

12 March 2012 at 9:24pm
A custom field box when creating a page in the admin panel would be prefered
Adding fields to pages is easy. Make sure you've read the first 2 tutorials which cover adding fields to pages. If your products are already pages then you don't need DataObjects.
| 619 Views | ||
|
Page:
1
|
Go to Top |


