This forum is for assistance with theme development.

Quest for multiple-templates

Over the past several days I've been immersed in hacking xtemplates. My goal was to assign templates based upon sections of the Web site. My first inclination was to assign styles based upon the vocabulary of the site, later I decided that for my purpose it would be better to assign styles based upon terms.

I've gotten as far as:

  1. Copying Xtemplages and renaming every reference
  2. Creating the necessary functions to access the "terms" stored in the DB. (wish that I had known about some of the functions in taxonomy.module before hand)
  3. Generating new forms in the theme manager [ /admin/system/themes/mxtemplate ] to assign specific templates to each term.

Where I was headed:

I was hoping to somehow pull the term (taxonomy) of the current page, and match it to the data that I had already collected. If there was a match, I was going to give the page a different style sheet. But I'm not sure if this is even feasible. I realized this when I started poking around more in the xtemplate code. Then I started looking at the URL's that Drupal generates and I realized that you can have multiple taxonomies displayed at the same time. Obviously I'm struggling to understand the different components of a drupal page that gets rendered to a browser.

Displaying invididual blocks only

All blocks are called using tags {blocks}.

How can I display the individual blocks? I know they have their ID's, but I can't find anywhere in documentation how a tag invoking the individual block looks like? How to get some block's unique ID?

Additionally, is there any documentation on the list of Drupal's tags?

Guys, I am sorry - I am the Drupal beginner, and some things are very unclear to me even after fiddling with Drupal for a few weeks... :( Please, give me a hand here...

Displaying invididual blocks only

All blocks are called using tags {blocks}.

How can I display the individual blocks? I know they have their ID's, but I can't find anywhere in documentation how a tag invoking the individual block looks like? How to get some block's unique ID?

Additionally, is there any documentation on the list of Drupal's tags?

Guys, I am sorry - I am the Drupal beginner, and some things are very unclear to me even after fiddling with Drupal for a few weeks... :( Please, give me a hand here...

Special formatting for "Static on front page" option

I would like to put the words "Featured Article" at the top of each node that has "Static on front page" checked. I'm using xtemplate.

I tried inserted "Featured Article" after the div class="node {static}" tag and it worked, sort of. It put "FEATURED ARTICLE" at the top of every node, not just static on front page nodes. Is there any way to limit it to just static on front page entries?

Frontpage with different node content

I need to set up the front page content so it displays Title and teaser from the pages that have 'Promoted to front page' option setup - just like the default, but would need to use 4-6 separate table cells for display. Meaning newest articles would be output in 4-6 cells.

So the same tags would be invoked 4-6 times. I have tried to copy the code from BEGIN: node to END: node into four cells but the output is all messed up. I know I am missing the basics here, but I really can't do it. :(

Taxonomy terms are all assigned. How do I start doing this?

Multiple Templates: Help, how do I style each section?

I’ve scoured the forms, read every tutorial that I can get my hands on and I’m still a bit confused regarding multiple templates. You see, I want more than the same basic layout for every page. I would like to have access to multiple layouts within a single theme, which I could then assign to various pages (or nodes, still trying to figure that one out).

So I throw myself at the mercy of those wiser than me. Drupal community, how do you create multiple layouts using the same theme? How do you vary the layout of each section within your Web site? I’m a fairly skilled CSS programmer with only a modest understanding of PHP/Drupal/Xtemplate.

Example: Using flexinode (http://drupal.org/node/view/5737) I’ve created a new content type called "Campus News." Under taxonomy I’ve created a new section called "Campus News." Now I would like to style this section differently than the other sections of the Web site. In fact I would like to have the option of creating a new style for every section. This is where I hit a roadblock, because Xtemplate (which is great) uses a single template file for the entire site. How might I get around this limitation and assign various styles to each section?

Here’s some of my research:

Related Posts

Apply Specific HTML template to: taxonomy OR node-type OR module OR block

http://drupal.org/node/view/8084

Pages

Subscribe with RSS Subscribe to RSS - Theme development