content in div's not tables, how to get this in my template?

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.
Locked
User avatar
carsten888
Joomla! Ace
Joomla! Ace
Posts: 1224
Joined: Sat Feb 11, 2006 8:32 am
Contact:

content in div's not tables, how to get this in my template?

Post by carsten888 » Tue Jun 03, 2008 1:44 pm

Using Joomla 1.5.3. the Beez template got content output in divs, but in my template its all tables again. where can I set this?

I checked the templateDetails.xml for a parameter, the params.ini files and of course the template itself, googled and searched this forum.

How do I get content in div's in my template?
Last edited by carsten888 on Wed Jun 04, 2008 7:45 am, edited 1 time in total.
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...

User avatar
carsten888
Joomla! Ace
Joomla! Ace
Posts: 1224
Joined: Sat Feb 11, 2006 8:32 am
Contact:

Re: content in div's not tables, how to get this in my template?

Post by carsten888 » Wed Jun 04, 2008 7:45 am

I got it.

It's all got to do with the dir 'html' in the template-dir. There are all the template-specific output thingies. O this is wonderfull! :D
In 1.0.x I used to hack the living daylight out of components to get what I want, always having to make sure I keep a copy of the original and I write what I hacked in readme.php. Now all these files can go in this template specific dir and what is best, can easyly be copy-pasted into another site. Wow!

Totally falling in love with Joomla again.

ok, so if you want content in div output:
copy-paste from the Beez template html/com_content into your template dir and you're set.

Joomla 1.5.x only
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...

szonkie
Joomla! Explorer
Joomla! Explorer
Posts: 256
Joined: Thu Jul 05, 2007 10:41 am

Re: content in div's not tables, how to get this in my template?

Post by szonkie » Fri Jul 11, 2008 3:11 pm

You seem to know you divs...where can I define the module/components...outage tags?
I know Joomla picks up on certain name conventions set by the css sheet, can I change them to my own?

Also I seem to be having trouble setting divs around certain module positions, e.g. I set a <div id="user4"> around module user4 but when I inserted the #user4 tag into the css sheet and set a few options nothing happens?

Any ideas?

Creating templates for Joomla is a bit of a pain at the mo as you dont see the results direct as you would do with Dreamweaver...this is annoying!!! but I know it will be worth it when I get to grips with the layout and the css sheets.

Advice appreciated

Cheers

Joomla 1.0.15

User avatar
carsten888
Joomla! Ace
Joomla! Ace
Posts: 1224
Joined: Sat Feb 11, 2006 8:32 am
Contact:

Re: content in div's not tables, how to get this in my template?

Post by carsten888 » Fri Jul 11, 2008 6:29 pm

You seem to know you divs...
:)
where can I define the module/components...outage tags?
you can't . some modules adn components have nice clean validating html/css output, others are old-fashion tables, unvalidation and sometimes even break your layout. You would have to get into the mudule or component itself to fix that (not recommended if you don't know what you're doing).
In Joomla 1.5.x there is a lot of improvement with output code. validating , no more tables. :D
I know Joomla picks up on certain name conventions set by the css sheet, can I change them to my own?
All the output code uses certain classes so changing them in your css would not change the output. if you realy want to, you would have to change the output, which I would not bother if I was you.
Also I seem to be having trouble setting divs around certain module positions, e.g. I set a <div id="user4"> around module user4 but when I inserted the #user4 tag into the css sheet and set a few options nothing happens?
example:

Code: Select all

<div id="banner">
				<?php 
					mosLoadModules ('banner',-1);
				?>
			</div>
if your code look lke the above, it probably got to do with your css. If you got firebug for firefox you can inspect your code and see in a list which style an element on the page. That way you can figure out which style is overriding the style you give to your container-div. try a padding-top and background red to check if your css is realy doing anything on the page, then work from there.
Creating templates for Joomla is a bit of a pain at the mo as you dont see the results direct as you would do with Dreamweaver...this is annoying!!! but I know it will be worth it when I get to grips with the layout and the css sheets.
Hang in there! you will get used to it. I also use DW. When I need to set up a template I start with an empty html/css template and just add the dynamic stuff later till its time to style the menuus and such. Also installing a local server on your box like WAMP, makes things easyer compare to having to upload to online each time (but then again, DW dot its own ftp, so thats not much wokr at all).

good luck. :D
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: content in div's not tables, how to get this in my template?

Post by ianmac » Fri Jul 11, 2008 8:16 pm

Remember that you can also specify module chrome that allows you to define the HTML that gets inserted around your modules. Let me know if you want more details and I will point you to the right post.

Ian

User avatar
carsten888
Joomla! Ace
Joomla! Ace
Posts: 1224
Joined: Sat Feb 11, 2006 8:32 am
Contact:

Re: content in div's not tables, how to get this in my template?

Post by carsten888 » Sat Jul 12, 2008 6:24 am

ianmac wrote:Remember that you can also specify module chrome that allows you to define the HTML that gets inserted around your modules. Let me know if you want more details and I will point you to the right post.

Ian
do you mean you can set how many container divs are around each module?
Yes, please post something about this :)

thanks
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...

szonkie
Joomla! Explorer
Joomla! Explorer
Posts: 256
Joined: Thu Jul 05, 2007 10:41 am

Re: content in div's not tables, how to get this in my template?

Post by szonkie » Sat Jul 12, 2008 6:41 pm

Hi Chaps

Thanks for your advice, anything that will learn me quicker how to better style my css with Joomla would be a great help. I understand that Joomla module css might be controlling the modules so any divs I put around a module will be over rided...if this is active, so I guess I need to check what part of the css is doing this an grey it out and try my own divs.

Am I correct in this?
Also how can I make sure a module fills the entire cell, do I use a <div span?

Yeah chrome? can you advice further?

Thanks

User avatar
carsten888
Joomla! Ace
Joomla! Ace
Posts: 1224
Joined: Sat Feb 11, 2006 8:32 am
Contact:

Re: content in div's not tables, how to get this in my template?

Post by carsten888 » Sun Jul 13, 2008 8:15 am

so any divs I put around a module will be over rided
the div around your module position is for positioning it on the page in a layout. use the modules' style prefix parameter to style individual modules.
http://www.pages-and-items.com my extensions:
User-Private-Page, Redirect-on-Login, Admin-Help-Pages, Dynamic-Menu-Links, Admin-Menu-Manager, plugin load module in article, plugin pure css tooltip and more...


Locked

Return to “Joomla! Coding 101”