|
#1
|
|||
|
|||
![]()
I think I have asked this before, but never received an answer.
Is there a way to have a "SOLD" sign over properties which are no longer for sale? I am using an extra field to track availability as either "Available" or "Sold." For those that are sold, I would like to have the CSS process a text banner and layer it over the image. Where is the code that processes the building of the page view of properties in a particular category? Has someone already invented this wheel? Thanks. |
#2
|
|||
|
|||
![]()
For the benefit of the next pilgrim to pass this way, I will answer my own question with insights gleaned from support.
Change _summary.php, located in your website path->components->com_hotproperty->views->properties->tmpl This is pretty much MVC architecture. Code:
<?php $hotproperty =& MosetsApplication::getInstance('hotproperty'); //Use the following variables to inform the building of HTML part of the page $span_status = ''; $span_markup = ''; $extrafield_value =''; foreach ($this->extrafields as $extrafield) : $extrafield_value = MosetsHTML::_('hotproperty.content.extrafield', $extrafield, $this->property); // leave the spaces in the var definitions if($extrafield_value =='SOLD') : //echo "extra field value is " .$extrafield_value; $span_status = ' sold'; $span_markup = 'sold'; $span_close = ' </span>'; else : // echo "this was not a sold field"; endif; endforeach; echo MosetsHTML::_('content.header', $this->headerLevel, MosetsHTML::_('link', JRoute::_(MosetsRoute::getLink('hotproperty', array('view' => 'properties', 'layout' => 'property', 'id' => $this->property->id))), ($hotproperty->getCfg('show_thumb') ? '<span class='.$span_status.'>'.$span_status. '</span>'. MosetsHTML::_('hotproperty.image.photo', 'thumbnail', @$this->property->Photo[0]->thumb, null, '') : $span_markup) . $this->escape($this->property->name) ), $this->property->name, null, array('class' => 'contentheading') ); ?> Code:
.sold{/** text **/ font:bold 1.0em/1.0em Georgia, "Times New Roman", Times, serif; color: red; background: white; text-align:center; position: absolute; width:60px; /**adjust as needed**/ top: 5%; left: 20%; border:double; /**note: CSS3 TRANSFORM: ROTATE DOESN'T WORK IN ALL BROWSERS YET**/ -webkit-transform: rotate(25deg); /**safari, chrome**/ -moz-transform: rotate(25deg); /**firefox**/ transform: rotate(25deg); /**other browsers**/ } It will NOT flow through to the modules, such as the latest display. |
Thread Tools | Search this Thread |
Display Modes | |
|
|