I've been trying to get a list of properties to show using GetResource and MIGx (MIGx is to keep the tv's combined).
My Property listing page has this GetResource code on:
[[!getResources?
&tpl=`Property Listing Style Chunk`
&parents=`[[*id]]`
&showHidden=`1`
]]
My Property Listing Style Chunk is this:
[[!getImageList? &tvname=`Portland Properties` &tpl=`Property Listing Style` &docid=`[[+id]]`]]
And my Property Listing Style Chunk is this:
<div class='property span3'>
<div class='image'>
<div class='content'>
<a href='[[~[[+id]]]]'></a>
[[!If? &subject=`[[+image]]` &operator=`notempty` &then=`<img alt='[[+pagetitle]]' src='[[+image]]'>` &else=`<img alt='[[+pagetitle]]' src='default'>`]]
</div>
[[!If? &subject=`[[+price]]` &operator=`notempty` &then=`<div class='price'>£[[+price]]</div>`]]
</div>
<div class='title'><h2><a href='[[~[[+id]]]]'>[[!If? &subject=`[[+address]]` &operator=`notempty` &then=`[[+address]]`]]</a></h2></div>
<div class='location'>[[!If? &subject=`[[+town]]` &operator=`notempty` &then=`[[+town]]`]][[!If? &subject=`[[+county]]` &operator=`notempty` &then=`, [[+county]]`]]</div>
[[!If? &subject=`[[+beds]]` &operator=`notempty` &then=`<div class='bedrooms'><div class='content'>[[+beds]]</div></div>`]]
[[!If? &subject=`[[+baths]]` &operator=`notempty` &then=`<div class='bathrooms'><div class='content'>[[+baths]]</div></div>`]]
</div>
Now everything is working fine
http://www.hgh.digibug-dev.co.uk/properties/portland-properties/ but as you'll see only the first of the properties shown will link through to the details page... I've absolutely no idea why. Also the alt text is only showing on the first as well.
Here is the source code that is output:
<div class='property span3'>
<div class='image'>
<div class='content'>
<a href='properties/portland-properties/new-property.html'></a>
<img alt='New Property' src='00-website-images/floor-plans.jpg'>
</div>
<div class='price'>£1000</div>
</div>
<div class='title'><h2><a href='properties/portland-properties/new-property.html'>Address</a></h2></div>
<div class='location'>Town, County</div>
<div class='bedrooms'><div class='content'>3</div></div>
<div class='bathrooms'><div class='content'>2</div></div>
</div>
<div class='property span3'>
<div class='image'>
<div class='content'>
<a href=''></a>
<img alt='' src='00-website-images/weymouth-office.jpg'>
</div>
<div class='price'>£12</div>
</div>
<div class='title'><h2><a href=''>8</a></h2></div>
<div class='location'>9, 10</div>
<div class='bedrooms'><div class='content'>13</div></div>
<div class='bathrooms'><div class='content'>14</div></div>
</div>
<div class='property span3'>
<div class='image'>
<div class='content'>
<a href=''></a>
<img alt='' src='00-website-images/sale-board.jpg'>
</div>
<div class='price'>£5</div>
</div>
<div class='title'><h2><a href=''>1</a></h2></div>
<div class='location'>2, 3</div>
<div class='bedrooms'><div class='content'>6</div></div>
<div class='bathrooms'><div class='content'>7</div></div>
</div>
<div class='property span3'>
<div class='image'>
<div class='content'>
<a href=''></a>
<img alt='' src='00-website-images/portland-office.jpg'>
</div>
<div class='price'>£120000</div>
</div>
<div class='title'><h2><a href=''>Test Property</a></h2></div>
<div class='location'>Exeter</div>
<div class='bedrooms'><div class='content'>3</div></div>
<div class='bathrooms'><div class='content'>1</div></div>
</div>
Help, i'm losing my mind!!!