My intention is marking up my site with Microdata in a way I won't need to re-declare items that already exist in the page.
For example, my header will always contain info regarding the "Organization" that the website represents. Within the "Products" that I offer I can specify the "Brand" of that product. So the product's property "brand" will replicate the "Organization" info mentioned in the header.
Now I don't think I'm supposed to repeat the organization's markup within the brand property of the product item, since I feel there should be a way to reference that organization item directly.
I just haven't found a way to do this, are there any ideas? I've checked this answer and although useful it doesn't address my issue.
I tried messing with it however to give you an idea of my intentions:
<span itemscope itemtype="http://schema.org/Organization" itemref="myCompany">
<meta itemprop="name" content="Company Name" />
<meta itemprop="url" content="http://example.com/" />
<meta itemprop="description" content="description" />
</span>
<span itemscope itemtype="http://schema.org/Product">
<span itemprop="brand" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="id" content="myCompany" id="myCompany" />
</span>
<meta itemprop="name" content="Foo product" />
<meta itemprop="description" content="You can do Bar with it" />
</span>
This doesn't work since it adds the the "id" property to both "Organization" and "Product".
EDIT1:
zigojacko's answer didn't really go towards what I was expecting, since he uses a single container with all the information needed to present all the markup for his product.
However in my case the site layout isn't broken down into a container that would hold all the necessary information, as my company info is within the header and the products/offers are near the footer (as the main form to define those offers is above the fold) and other info is scattered between each of those containers.
As such I would eventually like to link the company (that resides in the header) to the brand of each product (that reside near the footer), I just wouldn't like to repeat all the code necessary to describe the company and therefor would prefer linking to some sort of item identifier.
There is also the possibility of nesting every bit of content within the page to the company, but as a comment to this question I mention that specific question in the Webmasters Stack Exchange. So I know how to pull that type of solution off, I'm just wondering if there's the possibility of referring to an existent item elsewhere on the page.
EDIT2:
In the comments of this question I might have found a better way to explain what I mean.
By pointers I mean an html attribute that could reference an Item. In the code example I gave, I have a loose (not nested) Organization that I would like to be inserted into my second item Product within it's brand property, but without having to copy+paste or echo again within the Product. I tried to simulate that behavior with the itemref attribute.
body
tag, within an "Organization" or "Product" item type. I am thinking however that I could declare the "Organization" within the header, but then use it with a pointer later within the code to create the relationship. This would allow me to have less to worry about in regards to containers and what properties are getting linked to what items. – Fernando Silva Jun 30 '14 at 16:50Item
. In the code example I gave, I have a loose (not nested)Organization
that I would like to be inserted into my second itemProduct
within it'sbrand
property, but without having to copy+paste or echo again within theProduct
. I tried to simulate that behavior with theitemref
attribute. – Fernando Silva Jun 30 '14 at 17:17