uniqu3 wrote:It is possible that if there is nothing to count, template isn'T processed, i had a similar case with CGCalendar (i think upcomminglist templates).
So probably something like this would work:Code: Select all
{capture assign="foo"}{Products and your params}{/capture} {if !empty($foo)} {$foo} {else} Oh dear, we have nothing to show, sorry! {/if}
CMS Made Simple 1.10 Site
Re: CMS Made Simple 1.10 Site
This worked, Goran!
Re: CMS Made Simple 1.10 Site
Whats the module that does the rolling photos?
Re: CMS Made Simple 1.10 Site
The "rolling photos" are done with JQuery Tools Scrollable plugin found here:
http://flowplayer.org/tools/scrollable/index.html
I created a Products template that outputs the slides with this code:
I created a page called "ajax" and put this module call in it:
{Products summartytemplate='quickstart_home_slider'}
You can see this page here:
http://figenterprises.net/ajax.htm
Then on the home page, I use JQuery to fetch the slider from the Ajax page and insert it into the homepage using the following code (in a ScriptDeploy Module javascript template). (In ScriptDeploy double braces {{ }} are interpreted as Smarty tags.)
Maybe I should make a module that does this.
Ken
http://flowplayer.org/tools/scrollable/index.html
I created a Products template that outputs the slides with this code:
Code: Select all
{strip}
{if $smarty.get.w >= 1024}
{assign var='slide_width' value=708}
{assign var='slide_height' value=437}
{else}
{assign var='slide_width' value=478}
{assign var='slide_height' value=295}
{/if}
<div id="featured_wrapper" style="width:{$slide_width}px;height:{$slide_height}px">
<a class="prev browse next"></a>
<div class="items">
{foreach from=$items item=entry}
{assign var='field' value=$entry->fields}
{if $field.pic1->value != ''}
{capture assign='path'}{$entry->file_location}/{$field.pic1->value}{/capture}
<div class="item">
{CGSmartImage src=$path width=$slide_width height=$slide_height nocache=1 noembed=1}
<div>
<h2><a href="{$entry->detail_url}">{$entry->product_name}</a></h2>
<p>{if $entry->fields.num_bedrooms->value != ''}{$entry->fields.num_bedrooms->value} bed {/if}
{if $entry->fields.num_bath->value != ''}{$entry->fields.num_bath->value} bath {/if}
{$entry->categories.0->name} in {$entry->fields.city->value}, VA.<br>
<a href="{$entry->detail_url}" style="color:#E9F2F6">Click for details!</a></p>
<h3> $ {$entry->price} / month</h3>
</div>
</div>{* /item *}
{/if}
{/foreach}
</div>{* /scrollable *}
<a class="next browse right"></a>
<div class="navi"></div>
</div>{* / #featured_wrapper *}
<div class="clear"></div>
{/strip}
{Products summartytemplate='quickstart_home_slider'}
You can see this page here:
http://figenterprises.net/ajax.htm
Then on the home page, I use JQuery to fetch the slider from the Ajax page and insert it into the homepage using the following code (in a ScriptDeploy Module javascript template). (In ScriptDeploy double braces {{ }} are interpreted as Smarty tags.)
Code: Select all
jQuery(document).ready(function{
{{if $slider_on}}
get_slider();
jQuery(window).resize(function() {
jQuery("#featured_slider .loader").remove();
jQuery("#featured_slider #featured_wrapper").remove();
get_slider();
});
{{/if}}
});
function get_slider(){
// get window width
var thiswidth = jQuery(window).width();
if (thiswidth >= 1024){
slide_width = 708;
slide_height = 437;
}else{
slide_width = 478;
slide_height = 295;
}
loader_v_pad = (slide_height - 55) / 2;
loader_h_pad = (slide_width - 100) / 2;
lPad = loader_v_pad + "px" + " " + loader_h_pad + "px";
lHeight = slide_height - (2*loader_v_pad);
lWidth = slide_width - (2*loader_h_pad);
// setup loader
var sliderLoader = jQuery('<div class="loader"><img src="{{root_url}}/uploads/themes/qs/images/ajax-loader.gif" alt="loading..." /><br><span>Loading Available Properties...</span></div>')
.css('padding',lPad).width(lWidth).height(lHeight)
.appendTo('#featured_slider');
jQuery('#featured_slider').css({width:slide_width,height:slide_height}).load('{root_url}/ajax.htm?w=' + thiswidth, function(){
jQuery(document).ready(function() {
sliderLoader.hide();
jQuery('#featured_wrapper').scrollable({
circular:true
}).navigator().autoscroll(7000);
});
});
}
Ken
Re: CMS Made Simple 1.10 Site
Thanks for the detailed reply, I shall try this out.
Re: CMS Made Simple 1.10 Site
Actually a self contained module would be easier 

Re: CMS Made Simple 1.10 Site
Great site! Just noticed one thing on the Search listings forms in the side bar. Right now it says "Should the query match all, or any of the tests below?" - was that the placeholder copy when you demoed the page to the client, or is that what you intend to present to end-users?
-S
-S
Re: CMS Made Simple 1.10 Site
One more quick design feedback: On the For Rent page (http://www.figenterprises.net/properties-for-rent.htm), the "Read More" button is under the horizontal rule which makes it appear related to the item below instead of the item above. You may want to move that above the border so it appears directly under the image that it is related to.
S
S
Re: CMS Made Simple 1.10 Site
@spcherub, the dropdown text is default in the Products module search template. I suppose I should just set it to "both" and eliminate that field.
Thanks for the feedback!
Thanks for the feedback!