| FAQ addon |
|
|
|
|
The most widespread slicing for Joomla templates is performed in two ways. Let’s examine two variants here:
when a template is sliced with divs <div>
<div>
<div>
content
<div> </div>
</div>
when a template is sliced with tables <table>
<tr>
<td>
Content
</td>
</tr>
</table>
All that is situated between <div></div> represents a block. It can include constructions of various difficulties from other ‘divs’ to tables. The main thing is to detect correctly where the div begins and closes. The slicing process comprises strict elements hierarchy. Every div can be inserted into another one and so on. Tables are organized in the following way. A table comprises lines, lines are parted with cells. <table> - means that a table started.
<tr> - means that a line started.
<td> - means that a cell started.
Text – cell’s content.
</td> - means that a cell ended.
</tr> - means that a line ended.
</table> - means that a table ended.
There can be placed any number of lines into the table. There can be placed any number of cells into the line. Thus you reach the necessary dimensionality of the table. We will provide an example of a table of two lines and three columns. <table>
<tr>
<td>
Content
</td>
<td>
Content
</td>
<td>
Content
</td>
</tr>
<tr>
<td>
Content
</td>
<td>
Content
</td>
<td>
Content
</td>
</tr>
</table>
What we’ll get will be the following table:
In order to insert correctly a line of component’s integration into the template it’s necessary to delete blocks (divs or tables) with the maximum nesting gradually until you get the required result that the area where you want to output the component is empty. Here is an example: <div>
<div>
<table>
<tr>
<td>
Content
</td>
<td>
Content
</td>
<td>
Content
</td>
</tr>
<tr>
<td>
Content
</td>
<td>
Content
</td>
<td>
Content
</td>
</tr>
</table>
</div>
<div>
<table> We’re deleting this table.
<tr>
<td>
Content
</td>
<td>
Content
</td>
<td>
Content
</td>
</tr>
<tr>
<td>
Content
</td>
<td>
Content
</td>
<td>
Content
</td>
</tr>
</table>
</div>
</div>
We’ll get:
<div>
<div>
<table>
<tr>
<td>
Content
</td>
<td>
Content
</td>
<td>
Content
</td>
</tr>
<tr>
<td>
Content
</td>
<td>
Content
</td>
<td>
Content
</td>
</tr>
</table>
</div>
<div>
<?php require_once ("$mosConfig_absolute_path/components/com_joomdragdrop/joomdragdrop.php"); global $option, $Itemid; dragdrop_view($option, $Itemid); ?> </div>
</div>
We’ll get:
In order to understand which div or td tag (in case of slicing the template using the tables) should exactly be changed, we suggest using the Firefox browser and a its free add-on FireBug: After you launch this add-on open your site’s page and click the green icon in the right bottom corner of the browser to start the add-on. Further you need to click the Inspect button in the add-on and pointing your mouse over the site’s page find and select with the mouse click the area where you are going to activate modules dragging with the help of our component. Then, in the back-end of your Joomla site you need to open the HTML code of the template being used and find the tag which was defined with FireBug. This tag’s content (this can be either div or td tag) should be replaced with the following: <?php require_once ("$mosConfig_absolute_path/components/com_joomdragdrop/joomdragdrop.php"); global $option, $Itemid; dragdrop_view($option, $Itemid); ?> Be careful! You shouldn’t delete the tag itself – you need to replace the content between <div> and </div> or <td> and </td> tags! |
|||||||||||||||||||||||||||||










