Project:Internet Services
Version:4.7.x-1.1
Component:Code
Category:support request
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I like this theme (thanx for your work) and wanted to use several versions of it on one site along with switchtheme module for users to toggle between them, but whenever I rename this theme's folder from "internet_services" to anything else (e.g., internet_services_1 or whatever), the layout breaks.

Specifically, the primary menu items no longer appear as highlighted rectangles horizontally placed in the header, but instead appear as a long, vertical bulleted list in the header.

I went into template.php and noticed several theme specific functions, meaning that a users can't simply rename the folder but has to edit code as I thought was kinda common Drupal practice?

Problem is that when I did a global search-replace for the theme name in template.php (2 occurances), i got the primary links menu to display twice, stacked on top of eachother in the header-- one as the bulleted list, and then once below that as the intended horizontal/highlighted recatangles. I couldn't find any other references to the theme name in other files, so not sure where else to look.

Two questions:

  • Is it possible to rework this template to be more generic/forgiving of name changes, and/or
  • What other code do I have to change to get the primary menu links to only display once?

Thanks again-- nice theme and hope to be able to use it.

-KV

Comments

#1

Category:bug report» support request
Priority:critical» minor

according to your Qs:

  1. i can't see the need of rework: the theme obey the rules of drupal theme, as like as others. you only need to take very little changes, if you hope to rename the theme (will mention later)
  2. i don't know why the primary link shown twice. it shouldn't be, if you rename the theme in a correct format

what you need to change when renaming a theme:

  1. rename the directory of the theme. for example, if you hope to change this theme into name "internet_services_1", rename its directory into that
  2. dig into the template.php, and change the function(s) name. drupal PHPtemplate engine will search around this file, and run the function which prefix will its theme name. for example, change function name "internet_services_primary" into "internet_services_1_primary"

drupal PHPtemplate is well documented, and i will suggest you to have a look about that, if you hope to take some customization to existing themes. on the other hand, hope you can provide your code if you still facing difficulty, so i will be able to have a look for you ;-)

#2

thanx for getting back; I must admit i've never read the PHPTemplate docs after renaming quite a few themes without problem, but that's totally no excuse for my ignorance (I must have been lucky so far :-) and appreciate the link. I'll read up on the docs and recheck my code and let you know if I still have probs.

#3

Status:active» fixed

user reply as problem solved, and so this thread will be closed.

#4

Status:fixed» closed (fixed)
nobody click here