This site shows a category ribbon along the top. The category ribbon has been manually created in a block, but the relevant css is present in the theme.

The code in the block is of the form:

<div id="cat-1" class="category">
<p><span class="cat_title">CategoryTitle</span>
<a href="#">Text that goes under the category title.</a></p></div>

Just place the above html in a block, set the input format to something that allows div elements and css styling (I used the full html input format after turning off the html corrector).

A full width region takes 5 of the categories to fill - in the above sample just replace "cat-1" with an appropriately numbered id (cat-2, cat-3...).

If anyone can think of a good way to automate this, have some gui for it, I am all ears.

The css for the category ribbon does not work perfectly on IE6 - the current behaviour is for the text and background colours to stay the same as before.

Comments

Is there a way to make the block "active" when you're on the respective page?

That way if you're on that specific page, the block is "highlighted" with the same color when you hover over it.

Member since:
3 June 2009
Last activity:
1 year 11 months

Unfortunately, not as is.

It is possible, but it would require there to be some php code in the block (to detect what page the block is on), and that is generally a bad idea.

Okay, thanks for the quick response! I appreciate it and I LOVE this theme. It's amazing!

I added code to make it an image instead of text and it wasn't working. Is this not doable for this code?

That would be awesome if it could be an image!

Member since:
3 June 2009
Last activity:
1 year 11 months

I have not tried it with images, but (maybe with some css tweaking) this should be possible.

Do you have a picture of what you are doing or even the code so that I can test it/suggest fixes?

Hi

I created the content type: newsribbon and made a block, called newsribbon and placed it in the region: middle

The block contains the following code:

<?php

$qu = "'";
$nodetyp = 'newsribbon';
$query = 'SELECT nd.nid nid from node nd where';
$query .= ' nd.type = ' . $qu . $nodetyp . $qu;
$query .= ' order by nd.changed desc';
$results = db_query($query);

$i1 = 0;
while ($result = db_fetch_array($results)) {
$i1 = $i1 + 1;
if ($i1 < 6) {
$node = node_load($result['nid']);
$len = strlen($node->teaser);
if (strlen($node->teaser)>50) {
$tes = substr($node->teaser,0,50);
}
else {
$tes=$node->teaser;
}
if (strlen($node->title)>20) {
$tit = substr($node->title,1,20);
}
else {
$tit =$node->title;
}
/* print $options[i1]; */
$tekst = '';
$tekst .= '';
$tekst .= $tit . ' nid . '">';
$tekst .= $tes . '
';
print $tekst;
}
}
/* catch if items are displayed and number of items < 5 */
if ($i1>0) {
while($i1 < 5) {
$i1 = $i1 +1;
$tekst = '';
$tekst .= '';
$tekst .= ' ' . ' ';
$tekst .= ' ' . '
';
print $tekst;
}

}
?>

By the way: the code is stored in the table "boxes"

Just a quick that there's a typo in that code you posted with the span tag. :)

Check out my page and see if you can figure this out:

http://www.uniters.net/

The Category boxes are for some reason staggering downward a few lines as they go from the left to the right.

What am I doing wrong here?

I cut and pasted the code from above... not sure what else I could be doing. Forgive me, I'm a fairly intermediate to novice with Drupal.

Member since:
3 June 2009
Last activity:
1 year 11 months

Looking at the code generated by the page,m there seems to be no closing </span> tag after the title.

The is there, not sure why you couldn't see it in the code. Is there possibly something I'm doing to block that from working in a setting somewhere/somehow?

Here is the code... its straight cut and pasted from above, with my content in what I think are the right places:

<?php

Groups
Click here to find, join and/or start a group in your local area.

?>

Any ideas?

Thanks for responding... I really dig the theme. Probably will upgrade to premium if we get this working.

Also, I corrected what looked like a typo:

<?php

You clearly over looked a key instruction in the initial post. I'll leave it to you to help yourself by re-reading.

and yes, the 'span class' example has a typo.

Member since:
3 June 2009
Last activity:
1 year 11 months

There still seems to be atleast one place that needs it fixing for. the same issue - in block 2. (two "pans" instead of span and also the latter is in the wrong place)

Also, I have not tested this with multiple blocks, but you will atleast need to torn off the block titles for the look to be correct.

Thanks for responding... I really dig the theme. Probably will upgrade to premium if we get this working.

Please note that the premium version is only available from the original author and for wordpress only - I ported the free version and added some features/enhancements.

Hi,

Can anyone tell me how to change the font size of the ribbon categories title? I've tried changing the font size in the cat_title class of the ribbon.css file, but the size doesn't change. If I insert a "font-size:" line in the category class, it works but it also changes the category text font size.

what I would like is exactly what can be seen on this site. For example, the first category has the title "arthemia free" with one font size and the text "A high quality theme originally released for wordpress with critical acclaim. There there was release two, improving some aspects of it to solidify its reputation." with a smaller font size.

Any help appreciated.

Best regards,
Pedro Meireles.

I've just figured it out. The problem is that the code found on this page is incorrect! Instead of span it has a pan tag. I just copy-pasted the text to my site and didn't notice that.

To the author of the site: please correct this so that it doesn't happen with anyone else.

Best regards.

Member since:
3 June 2009
Last activity:
1 year 11 months

oops - fixed. Sorry for all he trouble.

I realize this is probably very basic stuff, but I'm new to all of this so please excuse my ignorance.

I managed to get the five boxes lined up properly (through blocks) but can't figure out how to link them to the pages I want displayed upon clicking on them. I'd appreciate any help on this. Please talk to me like I'm a first-grader.

Member since:
3 June 2009
Last activity:
1 year 11 months

I you look at the code, there is in there. replace the # with the link that you want it to go to.

Thank you so very much for your quick response. It works like a charm now. I love Arthemia - thank you for sharing it.

Hi:

I am new to Drupal. Thank you for the excellent theme you produced. I am trying to use the news ribbon feature and get some warning messages.

"User warning: Table 'thrsiyf4_drp02.node' doesn't exist query: SELECT nd.nid nid from node nd where nd.type = 'newsribbon' order by nd.changed desc in /home4/thrsiyf4/public_html/entbi/includes/common.inc(1645) : eval()'d code on line 8."

I followed the steps you mentioned such as
1. created a content type
2. Created a block

How do I place contents on the 5 categories

Thanks

Raj

You need not enter the Title field for this to work. And only enter the title field within the block code.

cheers

Hi, hoping someone can help with why my styling just disappeared on http://www.edinburghchristmastrees.com !!

The links you see at top Order online etc where styled horizontally using the ribbon.css file - it was working perfectly and then suddenly disappeared. Cannot for life of me figure out why?!

Any help much appreciated.

Thanks!

This is a beautiful theme and I'm trying to use it for my site, but for some reason the drop down menu only works on select pages. It doesn't load on the main page for example... is it possible to make it show on all pages?

I've installed your hover module, but that doesn't seem to help.

Member since:
3 June 2009
Last activity:
1 year 11 months

@ECT - did you modify the arthemia_primary function in template.php, or install another module that modifies the menu system?

@ Ana - in the primary menu, please make sure that the "expanded" box is ticked next to the parent items and then the children should show on all pages.

Works now, thankyou.

Hello,

You can display Category Ribbon via views module.

Here is my template:

content?>" class="category">

<?php echo $fields[title]->content ?>
<?php echo $fields[title]->teaser ?>

note that counter is an automatic field, that count result. So it increments category...

Just noticed a mistake.....

content?>" class="category">

<?php echo $fields[title]->content ?>
<?php echo $fields[teaser]->content ?>

note that counter is an automatic field, that count result. So it increments category...

Hello,

Quick question: can someone tell me how to assign a color to each ribbon block? Thanks very much.

Member since:
3 June 2009
Last activity:
1 year 11 months

That is done in CSS - have a look at ribbon.css and copy one of the css declarations from there and modify the color value. (for allowing upgradeability, instad of editing in the file, copy and edit the relevant bit into local.css)

Thank you for the fast reply, and thanks for this great template!