开发者

How to place individual articles into individual div's

I want to please know how to place individual 'articles' into individual CSS 'div's...??

Basically my design has my web page split into 4 different columns.. I want be able to place individual articles in each one of those columns...

At the moment, Joomla will place each article directly under each other, for instance in the 'right' section of the temp开发者_C百科late, without allowing me to insert any 'div's between the articles..

So maybe what I'm asking is how to add more sections to my template.. By sections i mean Eg. 'Banner' 'left' 'right' 'footer' 'disclaimer' etc... ???


You can do it with modules as well. Edit your template index.php file, and insert the divs where you want with the corresponding float:

<div id="left">
    <jdoc:include type="modules" name="left" style="" />
</div>

<div id="right">
    <jdoc:include type="modules" name="right" style="" />
</div>

Where the left,and the right ids are set in the template css file with the floats and etc.

Next is to include the positions into templateDetails.xml to the right place, like this:

<position>left</position>
<position>right</position>

Now you can create modules (Custom HTML modules) with the text/content, and position the created modules into the right or left position name.


Joomla templates use CSS as a styling tool. In order to add new sections to your template you must change your Cascading Style Sheets (*.css files).

Splitting your main content into four sections requires a bit of CSS magic and you should read up on the box model, the float property and this extensive tutorial.

One way of doing it using CSS is

How to place individual articles into individual div's

You can also do it with tables of course, just declare four columns.


You need a simple template override. Assuming that you are listing a blog style category, then make a copy of /public_html/components/com_content/views/category/tmpl/blog_item.php and put it in /templates/your template/html/com_content/category/blog_item.php. Edit that file to your liking then style accordingly. If you are not using blog category listing, just find the corresponding template file in the com_content views folder and use that.

Read this - http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

Once you learn how overrides work it will change how you use Joomla.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜