This forum is for assistance with theme development.

why can I only make primary links bigger, but cannot make them smaller? what's overriding?

I'm using a modified bluemarine.

I want to make the primary links small. I've tried .5em, .1em, with no change.

If I put in 8em, they do become huge.

what's going on?

I just learned that with sidebar,
the block style in style.css styles sidebar,
and that minimum width is width of the longest word.

Is there such a thing as minimum width for primary links? and where is it set?

I want to make the primary links half as big.

HOWTO: Category description on index pages above teasers without bloated HTML

In furtherance of this thread: Display vocabulary description, which seeks a way to display a term's (category) description as the introduction text for each section, or category, within a site.

The goal:

  1. Site directory structure thus: www.example.com/category/index.htm and; www.example.com/category/sub-category/index.htm
  2. To display an introductory description for each category (term description) above all sub-page teasers
  3. Remove (HTML) code-bloat from the link (anchor) title attribute beneath each teaser (currently term description x No. of teasers = lots of repetitive text!)
  4. Replace removed (HTML) code-bloat with category/section name instead

The taxonomy_context module currently goes part-way to achieving our goals but doesn't address the last two steps and furthermore, relies on the help block to display our description text above out teasers which, apart from not being semantically-correct, could be problematic in themes which utilise a show/hide help system with different style "decorations" (CivicSpace is one such theme).

NOTE #1: I have only used this against the above site structure. If you have a more complex schema, this may not work as intended but it is hoped that, at minimum, you can now easily customise it to your needs.
NOTE #2: Clean URL's is enabled and I have the pathauto module installed.
NOTE #3: Tested only with PHPTemplate theme engine (Drupal's default).

Instructions

Open-up your node.tpl.php file and right underneath the first opening php line...

<?php /* $Id: node.tpl.php,v 1.4.2.3 2005/11/30 21:06:47 robinmonks Exp $ */ ?>

... make-way to copy/paste our first code snippet:

  <?php if ( !$page && arg(0)=="taxonomy" || $is_front) /* NOT a node page but a tax or the home page*/ : ?>
  <?php
	  $categories = <a href="http://api.drupal.org/api/4.7/function/taxonomy_node_get_terms" title="API details">taxonomy_node_get_terms($node->nid)</a>;
	  foreach ($categories as $category) { /* Re-write the category links to avoid code bloat from long link titles (description ) */
	  $categorylink = <a href="http://api.drupal.org/api/4.7/function/l" title="API details">l</a>(t($category->name), 'taxonomy/term/' . $category->tid, array('title' =>$category->name), NULL, NULL, TRUE) ."\n";
	  }
  ?>
	<?php if (($id == 1) && !$is_front) /* Place term desc at the top(id)  but NOT on home page */ : ?>
	<?php print $category->description ?>
		<hr />
	<?php endif; ?>
  <?php endif; ?>
 

Then, (further down the code) find the following snippet which writes the link under each teaser entry which points to the category's pertinent index page (www.example.com/category/index.htm):

Posted in print $terms

adding a second right sidebar. which theme or engine file prevents bluemarine from running off the page?

I'm trying to add a second right sidebar. It runs off the page.

In the channel nine theme, which as 2 right sidebars, it has a fancy function for calculating the width of the page so things don't run off.

Where in bluemarine does that happen? bluemarine never runs off the page for me but I don't see it make the calculation anywhere.

content keeps dropping down

Hi.

I am currently trying to build a new website using drupal - www.webberscorner.com

but i have having some problems with some of the content, mainly the editing, posting stuff is dropping below everything.

here is an example - http://www.webberscorner.com/user/5.

why is this happening and how do i stop it.

dave.

width: why does changing the width of sidebar in style.css have no effect? what other files might be overriding it?

I am trying to change the width of the sidebars. (I'm using a modified bluemarine.)

I try changing the width to 1%, 20em, etc. It has no effect.

This has puzzled me in the past because I know 90% of the time I can change sidebar width this way, but today its having no effect.

Are there other files that could be overriding it?

I looked in template.php.

Reverse Page Order?

I have my site with 26 pages of content and currently it views the most recent on top at the frontpage being page 1. Instead I want the frontpage to be the last page #. So the most recent stuff would still be on the frontpage, but the page number would be 26 or x.

Pages

Subscribe with RSS Subscribe to RSS - Theme development