This forum is for assistance with theme development.

duplicated theme dysfunctional

I'm learnng my way around PHPTemplate and drupal theming. I really like the Internet_Services theme, so I decded to duplicate it, rename it, then play around with the CSS to tweak it for my purposes.

Interestingly, when I did this and activated the new theme, the primary links no longer appeared in the duplicated (new) theme. Switching back to the older (original) theme made the links reappear in the header, but they refuse to show up when using the newly created (identical!) theme.

How to add navigation bar

Where can I look to get info on how to add the nav bar at the top of this page http://revsn.com/index.php to the top of a drupal produced sub-directory http://revsn.com/prtl/ ?

I have tried to break the code down, and it looks like the code has broken me down instead.

How do I find the id number of a block?

I want to print a block directly in page.tpl.php. to do this, I need the block id number. Where do I find this?

css. Can only make links (eg navigation menu, related content) bigger, not smaller. why?

I'm modifying bluemarine.

When I edit style.css
the
a:visited

line,
if I put in fontsize:8em, font gets enormous.
if I put in fontsize: .5em, font does not change.

why can I only make links bigger, not smaller?

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

Pages

Subscribe with RSS Subscribe to RSS - Theme development