This forum is for assistance with theme development.

How does the Interlaced theme build the header links?

Hi,

I'm having trouble finding how the Interlaced theme build the header links. How does it decide which nodes to include? Are they customizable?

Thanks,

Marcus.

Structure of preset blocks

I can understand HTML and CSS but I know nearly nothing about PHP. I started to hack xtemplate to fiddle with the theme but I don't understand how I can access the layout of the preset modules.

For example I think I'm able to create a new block from scratch and then type in directly the PHP or HTML code. So I can mess all I want. But how can I change the display of a preset module like "Who's online" ? How can I change for example the div class it uses? If I look at the produced HTML I see:

Page Shell Idea: Nodes within Nodes

Please give me your thoughts and suggestions...

I'm thinking of writing a module for the purpose of creating page shells. I don't feel that there is currently a good way of handling this with Drupal. Basically I would like to have the freedom of:

- Creating a page (shell)
----> Then create regions within the page
----> And then assigning various nodes to those regions

In addition to this I would like to assign the page shell an alias and a theme. This would more strongly mimic traditional Web development while still taking advantage of Drupal's CMS features.

In a lot of ways it would parallel what flexinode already does. For example flexinode allows a user to create a new page type, and assign fields to the page. Within those fields the user can enter raw data.

My hope is that a page shell module would allow a user to create a new page shell, and instead of adding text-areas, drop down menus or other types of forms, the module would allow you to create regions. Each new region would then sever as a container for nodes. You could have a node repository where you select which nodes you wanted to assign a region. Once assigned to the region you could schedule each node to be displayed a certain period of time.

Such a module will require some tweaking of xtemplate so that the template system knows what to do with the various regions. My thinking is that each region could be wrapped in a div tag, along with some id/class that describes the region. Then within the CSS you could style the region and change it's placement, color etc.

Themers give very little satisfaction

I've noticed that on most of the third party themes the themers who made the theme have forgotten to include the "Edit" buttons in most of the configuring pages. For example on the user side theres the "My Account" page, and on the administration side... well, every dang page that has several "sides" to it. One in perticular is the "Menu" configuration. The only theme that works is the default XTemplate.

Drupal and BBClone

I'm trying to add a visitor counter to my web site powered by drupal. I thought to modify xtemplates and add the code for the counter. I use bbclone and the code to add is

define("_BBC_PAGE_NAME", $title);
define("_BBCLONE_DIR", "~/bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);

but I don't understand where to put this code (some where in xtemplates.theme). It should be on every page and $title should be the title or an identifier of the page.

thanks
Marco

Solution for multiple templates: Path templates "mxtemplate"

I've finally hacked my way to a solution for multiple templates. I have been modestly successful in assigning different templates based on the path. I will explore this solution further and if it seems worthy then I will try to develop a patch for the community to use. In the mean time here is an explanation of what I did along with some basic code examples.

Requirements:

  1. Drupal 4.4x
  2. Enable the path module
  3. Basic knowledge of PHP and some Drupal functions

Description:

I wanted to have the ability to display different layouts and possibly style sheets for pages within my site. To accomplish this I modified the path.module to include some additional data. I then modified the logic in xtemplate to look for the the new information.

  1. First, I created an additional column in the db table "url_alias (this is the table that stores path information). I called the new column "template" and I assigned it the same properties as "dst" and "src" (dst, src are columns in the url_alias table).
  2. Then I copied xtemplate and renamed it to mxtemplate. I also changed every reference to xtemplate to mxtemplate so that the system wouldn't freak out (m, for multiple xtemplates).
  3. Next I modified that path.module to include to include a pulldown menu (form_select) of the various themes available within the mxtemplate directory. I also modified several several functions within path.module (there are too many to talk about, but I will try to post the code below).
  4. Now that I had templates assigned to every path alias, I hacked the mxtemplate.theme file.
  5. Basically I wrote a function that compares the current pages path to the path alias stored in the db. If there is a match then it returns the assigned template directory. (see code below)

Code:

Here is a link to the code for the modified path.module. I haven't done a lot of testing of this, so PLEASE if you intend to use this BACK-UP your file.

Pages

Subscribe with RSS Subscribe to RSS - Theme development