1
lighthouse
new user confused on templates/themes
  • 2004/5/6 21:21

  • lighthouse

  • Just popping in

  • Posts: 10

  • Since: 2004/5/6 1


Hi, I'm new to XOOPS and like it a lot so far. I changed my prefs to use the phpkaox theme, but I don't like how the text w/in the blocks is centered. How can I change this? I looked inside the various css files but I don't see any "align: center" in those.

Everything about the install and setup went very smoothly, but the template/theme thing is kind of confusing.

Thanks

2
JackJ
Re: new user confused on templates/themes
  • 2004/5/6 21:36

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Templates control the layout of individual blocks. Most existing XOOPS themes are based on the XOOPS "default" template.

You can't edit the default template, you must clone it first, and edit the clone. To clone the default template

Go to System Admin-->Templates, and click "Clone" next to the default template, you may call this clone anything you wish. XOOPS will now install the clone. After you have done this, go to System Admin-->Preferences-->General Settings and make the clone your default Template (not theme)

Then go back to System Admin-->Templates. a tick should be to the right of the default template. You may need to click on "Generate" if any of the module files have a "red" generate link.

Your Blocks layout is controlled from Templates, go to System-->Admin--Blocks and look for the block you wish to alter. Then click "Edit" to the right of the block. In the next dialogue box you will see "Edit Template". Click this, and you will see the code for your block. You will also see the "classes" that are being called which relate to the style.css sheet in your themes folder.

Edit:

If you specify the block you wish to center I might be able to assist with this

3
tl
Re: new user confused on templates/themes
  • 2004/5/6 21:38

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


Xoops WIKI has information about themes and templates. You can find it here

under Seciton 6. XOOPS theme developer's guide

"Default Theme's CSS With Comments" will help in figuring what is doing what.

Happy reading

4
lighthouse
Re: new user confused on templates/themes
  • 2004/5/6 22:11

  • lighthouse

  • Just popping in

  • Posts: 10

  • Since: 2004/5/6 1


Ok I did the clone thing and the generate (that's not intuitive), but when I went to edit my block there is no template to edit. I see where all the other blocks have a template to edit but this is a custom block.

The reason I made a custom block may have been misguided. What I intended to do was have a description of my site that shows up on the main page and always stays there. Maybe there's a better way to do that.

[BTW, I did read the wiki docs on themes and templates, but they weren't too helpful. the docs seem to assume too much]

5
JackJ
Re: new user confused on templates/themes
  • 2004/5/6 22:21

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


A custom block is fine for this, just choose "center-center" for its position and choose "top page", your top page is the default module for your site, i.e News. or you can have the block appear in more than one module. You can also add "weighting" for order of appearance when using more than one block i.e.
1
2
3

If you wish to center the text you can use standard HTML
your text
tags


6
lighthouse
Re: new user confused on templates/themes
  • 2004/5/6 22:27

  • lighthouse

  • Just popping in

  • Posts: 10

  • Since: 2004/5/6 1


Actually, I DON'T want the text centered, but for some reason it is. It only is centered when I choose the phpkaox template (it came w/ the install). When I use the default XOOPS template (or theme, I guess) the text is left-aligned. I did the center-center thing and top page. that was all pretty intuitive, but for some damn reason I can't get the text to left align.

I suppose I could use tags, but that just doesn't seem right.

7
JackJ
Re: new user confused on templates/themes
  • 2004/5/6 23:05

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


If you go to your style.css sheet, around line 52, edit it to look like this:

.blockContent {text-align: left; background-color: #efefef; padding: 2px;}

Remember to go to

System Admin Icon--then choose Preferences-->General Settings, and look for this field:

Update module template .html files from themes/your theme/templates directory? Set this to Yes

Also perhaps clear out your template_c folder

You will also need to edit styleNN.css and styleMAC.css for Netscape and the Mac

Now that you have templates set up and if you wish to re-align other menus, for example for "Main Menu" go to System Admin-->Templates-->System-->system_block_mainmenu.html

You will see the classes your template is calling. Actually this theme does not have a lot of classes defined in style.css. If you have a look at the style.css in your default theme folder, you could perhaps define more similar classes in this theme's style sheets you are using

Login

Who's Online

307 user(s) are online (155 user(s) are browsing Support Forums)


Members: 0


Guests: 307


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits