ตกแต่งรถตู้,รถตู้แต่ง,ตกแต่งรถตู้VIP,รถตู้แต่งVIP,บริการแต่งรถตู้VIP,แต่งรถตู้VIP3ราง,แต่งรถตู้เบาะ3แถว,ร้านตกแต่งรถตู้,แต่งรถตู้นำเที่ยว,ตกแต่งรถตู้ราคาถูก

อาทิตย์, ๒๕ กรกฏาคม ๒๕๕๓ ๒๐:%M

Adding new modules grid to YjSimpleGrid based Template

Written by 
Rate this item
(0 votes)

To add new modules grid please open ,

YOUR_SITE_ROOT/templates/TEMPLATE_NAME/layout/grids/yjsg7.php

Find lines 19 - 21

lines1920

Change "user" on line number 19 to your desired module prefix. Example "bottom".  For this example we will leave it as is .

Line number 20 is your module number starting key.

Example: you want to add module positions  user26 - user30 , your starting key would be

$YJ_starting_key =26;

since that is the first module position your grid would start with.

Now on line 21 change the 'yjsg_7_width' to 'yjsg_8_width' so your line 21 would look like this

$grid_widths = explode('|', $this->params->get( 'yjsg_8_width' ));

Next go to line number 25

line25

Change <div id="yjsg7"   to  <div id="yjsg8"


On line 31 change YJsg7_module_style to YJsg8_module_style

line31

Save that file as yjsg8.php and make sure it is located in

YOUR_SITE_ROOT/templates/TEMPLATE_NAME/layout/grids/  folder

Let us now add the template parameters and module positions for this grid. Please open

YOUR_SITE_ROOT/templates/TEMPLATE_NAME/templateDetails.xml file

Find line  291

</positions>

before this line add

<position>user20</position>
<position>user21</position>
<position>user22</position>
<position>user23</position>
<position>user24</position>
<position>user25</position>

In the same file after line number 557 add following code which controlls the modules width trough template manager

<param name="yjsg_8_width" type="yjsgmultitext" default="20|20|20|20|20" labels="User26|User27|User28|User29|User30" items="5" size="2" class="serialize_multiple" label="G8_LABEL" description="G8_DESC" />

After line 717 add following code so that your grid module style is automatically adjustable trough template manager

<param name="YJsg8_module_style" type="yjsgradio" default="YJsgxhtml" label="G8MS_LABEL"  description="G8MS_DESC">
<option value="YJsgxhtml">Square</option>
<option value="YJsground">Round</option>
<option value="YJsgplain">Blank</option>
</param>

save the changes.

So that the text is visible in template manager we need to add  G8_LABEL , G8_DESC, "G8MS_LABEL" and "G8MS_LABEL".  to our template language file.

Please open  

YOUR_SITE_ROOT/administrator/language/en-GB/en-GB.tpl_TEMPLATE_FOLDER_NAME.ini

file and at the end of the file add

G8_LABEL=Grid 8 module widths
G8_DESC=Add your description here for Grid 8 module widths
G8MS_LABEL=Grid8 Module Style
G8MS_DESC=Add your description here for Grid8 modules style

and save the changes you just made.

So you could style the module and apply any changes you might need please add

#yjsg8{
margin:0 auto 0 auto;
text-align:center;
overflow:hidden;
height:auto;
width:100%;
padding:15px 0;
       }

to YOUR_SITE_ROOT/templates/TEMPLATE_NAME/css/layout.css

Go to  YOUR_SITE_ROOT/templates/TEMPLATE_NAME/yjsgcore/yjsg_modulestyle.php

Find lines 31 and 40  , uncomment them and change YJsg7_module_style to YJsg8_module_style

lines3140

Next please open

YOUR_SITE_ROOT/templates/TEMPLATE_NAME/yjsgcore/yjsg_main.php

Locate line number 45


line45

Under line 45 add following code

<?php require( TEMPLATEPATH.DS."layouts/grids/yjsg8.php");/* grid 8 user26-user30*/ ?>

and save the changes you just made.

Your grid is ready. Please add your new modules and publish them in the modules positions you just made.

You can controll the modules width from your template manager.

Read 5550 times Last modified on จันทร์, ๒๖ กรกฏาคม ๒๕๕๓ ๐๓:%M

Leave a comment

logo
รุ่งเรืองประดับยนต์ร้อยเอ็ด สาขา2

75/10-12 ถ.เทวาภิบาล ต.ในเมือง อ.เมือง จ.ร้อยเอ็ด 45000
โทร: 043-516367 , 081-7696898  แฟ๊กซ์: 043-516267 Email: Rungruengcar@gmail.com
    © Copyright 2012. ตกแต่งรถตู้.com.  All rights reserverd. Design by RRP