I prepared this tip for Quick.Cms.Lite but it can be used also in Quick.Cart.
Hello I want to show You how to make additional type of displaying subpages which You can use for build FAQ on Your site or whatever You want. Here You can find ready example of this tip: http://www.portfolio.makaron.info.pl/projekty/Quick.Cms.Lite_v2.3_subpages_faq/?our-offer,3
Ok now what You have to do.. First You should edit file lang/xx.php and add next variable: $lang['Subpage_show_3'] it will be the name of our new type. Next You have to edit file core/common-admin.php find function throwSubpagesShowSelect() and after line:
because I don't want to display images in this type. When You want to display images You don't have to do anything. Now we editing file actions_client/p.php line:
if( $aData['iSubpagesShow'] < 3 )
for:
if( $aData['iSubpagesShow'] < 4 )
In file templates/pages_default.tpl we have to add some blocks here there are:
<!-- BEGIN SUBPAGES_LIST_3 --><li class="l$aData[sStyle]"><h4>$aData[sName] <a href="#faq$aData[sStyle]" onclick="displaySubpage( 'faq$aData[sStyle]' );">+</a> <a href="#faq$aData[sStyle]" onclick="hideSubpage( 'faq$aData[sStyle]' );">-</a></h4>$aData[sDescriptionShort]</li><!-- END SUBPAGES_LIST_3 --> <!-- BEGIN SUBPAGES_DESCRIPTION_3 --><h5 id="faq$aData[sStyle]">$aData[sDescriptionShort]</h5><!-- END SUBPAGES_DESCRIPTION_3 --> <!-- BEGIN SUBPAGES_HEAD_3 --><ul class="subpagesList" id="subList1"><!-- END SUBPAGES_HEAD_3 --> <!-- BEGIN SUBPAGES_FOOT_3 --></ul><!-- END SUBPAGES_FOOT_3 -->
In file plugins.css we have to add these two lines:
#subList1 li h5{display:none;} #subList1 li h4 a{text-decoration:none;font-size:1.4em;}
And last thing we have to do is to add two functions in file core/plugins.js here there are:
function displaySubpage( sBlock, oObj ){ var bCheck = false; if( !oObj ){ var bCheck = true; } if( gEBI( sBlock ).style.display == 'block' && bCheck === true ) gEBI( sBlock ).style.display = 'none'; else gEBI( sBlock ).style.display = 'block'; } // end function displayBlock
function hideSubpage( sBlock, oObj ){ var bCheck = false; if( !oObj ){ var bCheck = true; } if( gEBI( sBlock ).style.display == 'none' && bCheck === true ) gEBI( sBlock ).style.display = 'block'; else gEBI( sBlock ).style.display = 'none'; } // end function displayBlock
When You make all these steps You should recieve new type like in example. I hope someone will enjoy it.
Makaron, czy mógłbyś odświeżyć przykład? nie można podejrzeć do jakiego efektu dążymy. Ja chciałabym wyświetlić subpages w dwóch kolumnach bez zdjęć i nie wiem czy to będzie to... G