Loading...
 
Skip to main content

Features / Usability


Custom modules on home page.

Hey guys I am currently very happy with the way my site is functioning. But i need some help. I want to be able to put in custom modules in the home page. I.E. I want the size of each box to be different to the size of the modules on the side panes. and i want to be able to change the layout of the custom module so that it does not look like its inside a box. i.e. no borders on the module and the color inside the module should be customizable.

Please Help.

In ))TikiWiki(( 1.10, there's a nobox parameter that can be set to display only the contents of the module without the title and border, etc.

In other Tiki versions, you can try the decorations=n parameter (this is on the admin modules page, where each module display is configured), but I think the only way to get the effect you want is by editing the stylesheet. For the stylesheet (theme) your site is using, you have to override the normal settings for div.box, div.box-title, and/or div.box-data (these are the module divs). You need to add div.wikitext versions of each of these to specify the appearance of the modules in wiki pages.

So you'll have something like

Copy to clipboard
div.wikitext .box { width: 500px; border: 0 }

to have a wider module without a border.

Now, this will cause every module displayed in wiki pages to have those properties, which you may not want. To style only one instance (or several of the same), you could wrap the module with a DIV plugin and set a class argument, like:

Copy to clipboard
{DIV(class=>pageonebox){MODULE(module=>mycustommodule)/}{DIV}


Then in the stylesheet, do the selector like:

.pageonebox .box { width: 500px; border: 0 } 


So only the modules inside of div.pageonebox classes will have that styling. Well, there are different ways you could approach this, but this is one way.

-- Gary


Hey Gary I wanted to know with the modules i've learnt how to change the first part. But i cant get the text and the data fields to change. i.e.

This:
div.box {
margin-left: 4px;
margin-right: 4px;
margin-top: 4px;
margin-bottom: 10px;
background-color: #ffffff;
color: black;
padding-bottom: 10px;
overflow: hidden;
width: 150px;
becomes:
div.blogbox .box {
margin-left: 4px;
margin-right: 4px;
margin-top: 4px;
margin-bottom: 10px;
background-color: #ffffff;
color: black;
padding-bottom: 10px;
overflow: hidden;
width: 300px;
}

and that stretches out the module box in my wiki page when i use the div blogbox but i am having no success changing this:

div.box-data {
color: white;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 10px;
width: 170px;
padding-left: 4px;
padding-right: 4px;
}

to change the font to another font and another color.

do I make it:

div.blogbox-data {...

or

div.blogbox-data {...

or

div.blogbox-data .box (...

????

I am having no success. Please help.

Try one more combination 😊.

For the module data div:

.pageonebox .box-data { }


And for the title:

.pageonebox .box-title { }


-- Gary

No luck Gary.

Here's my code if you want to troubleshoot.

''/* Modules (modules are those boxes in the left/right columns) */
div.box {
margin-left: 4px;
margin-right: 4px;
margin-top: 4px;
margin-bottom: 10px;
background-color: #ff9900;
color: white;
border: 1px solid black;
padding-bottom: 10px;
overflow: hidden;
width: 170px;
}

/* Boxes are divided in title and data, this is the title */
div.box-title {
background-color: #999900;
border-bottom: 1px solid black;
color: white;
font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 10px;
overflow: hidden;
text-align: center;
padding-left: 0px;
padding-right: 0px;
margin-bottom: 1px;
width: 170px;
}

div.box-title table {
width: 100%;
}

span.box-titletext {
color: white;
}

/* And this is the data */
div.box-data {
color: white;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 10px;
width: 170px;
padding-left: 4px;
padding-right: 4px;
}

div.box-data a,
div.box-data a:hover {
color: white;
}''
/*############################################*/
/* Modules (in wiki pages) */

div.blogbox .box { (i've also tried __
.blogbox .box __{ here)
	__margin-left:    4px;
	margin-right:   4px;
	margin-top:   4px;
	margin-bottom:   10px;
	background-color:   #ffffff;
	color:   black;
	padding-bottom:   10px;
	overflow:   hidden;
	width:   500px;
}__

__~pp~.blogbox .box-title table {
    width: 100%;
}

/* And this is the data */

.blogbox .box-data {
	color:   #DE3421;
	font-family:   Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size:   4px;
	width:   300px;
	padding-left: 4px;
	padding-right: 4px;
}
__



div.blogbox-data .box-data a,
div.blogbox-data .box-data a:hover {
color: black;
}


''/*#####################################*/
/* When modules display a list of items each item is enclosed in a cell with the following style */
TD.module {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 10px;
color: white;
text-align: left;
''


One thing I noticed is that .box-title has a 170px width but you didn't change this in .blogbox .box-title, so it'll also be at that width.

I don't know without testing if it makes a difference, but you say .blogbox .box is working OK, but div.blogbox .box-title and div.blogbox .box-data aren't. What happens if you change div.blogbox .boxtitle to .blogbox .boxtitle and div.blogbox .box-data to .blogbox .box-data?

-- Gary

Yeah I just tried that. Still no luck.. it stretches the width out when i use

div.blogbox .box {
and
div.blogbox .box-data {

it stretches out the size of the box to what ever i choose and sets the width of the text in the data to the same width.

but it does not acknowledge font, color or font size changes..


another interesting thing i noticed. When I try to trial this with test module holding an image it does not display the image. It's seems as if its not even parsing the .box-data part of the code to see how to present the information.
oh dw I got the images to show.. but the font and stuff is still stuffed.