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?