This forum is for assistance with theme development.

Apply a separate sub-theme to certain pages

The scenario is this, I have created an ecommerce site (using Ubercart) with its own custom theme, what I would like to do is create a sub-theme of the custom theme which has its own style sheets and logo, I would then like to apply the sub-theme to all products contained within a single Ubercart product category. All other products in other categories will use the main custom theme used by the rest of the site.

Does that sound like something I can achieve? If yes any pointers on how I can go about it would be most welcome.

Implement from module and print inside node teasers.

I have a Pay2Publish module, which gets no support these days, so I have to turn to the community for the help. I guess this is a simple PHP questionon how to implement data from a module:

I want to take the messages generated by Pay2Publish module and display them bellow each node teaser.

Here's the code from the module:

/**
* Implements hook_node_view()
*
* Displays the Message for the author of a node
*/
function ms_paypublish_node_view($node, $view_mode, $langcode) {
$plans = variable_get('ms_paypublish_plan_' . $node->type, array());
$pp_node = ms_paypublish_load_node_nid($node->nid);

if ($pp_node AND !empty($plans)) {
if ($view_mode == 'full' AND user_access('renew own pay to publish nodes')) {
global $user;
if ($node->uid == $user->uid) {
switch ($pp_node->status) {
case 0: // Not Published
drupal_set_message(
str_replace(
'!link',
l(t('Publish'), 'ms_paypublish/publish/' . $node->nid),
variable_get('ms_paypublish_not_published_text', 'This content is not published. To publish, please click here: !link')
)
);
break;

case 1: // Published
if ($pp_node->expiration_date) {
drupal_set_message(
str_replace(

Add box around post content

Hi, have recently downloaded a Drupal theme and I want to change the background but when I do you can't read the post content because it's too dark. I want to put an image behind the text so I can have the text on a white box. If anybody could help that would be great.
Thanks,
Nick

Widening theme page

hi,

i need help with widening page width,
i am currently using Responsive Theme, already try adding this to my main CSS:

.page-width {
width: 1200px;
}

.stack-width { width: 1200px; }

the problem being that it works fine with chrome but not with explorer & mozilla,
you can take a look @ www.crazydesigns.biz

thanks

Getting the base url

I'm creating a theme and trying to get the domain name and everything else for images attached to links.

I believe there's a function or variable for this?

I would prefer not to hard code the links in my theme.

Basically I want it to automatically detect the domain and path.

The correct way to print field depending on language

Hi,
I have a multilingual site, and for many reasons (don't ask why) I'm not using the Entity Translation module. Intead, I have 3 description fields for each language, and I want to print those depending on the current language. I just wanted to ask if this is the correct andoptimal way to print render those fields,and whether or not it will have major implications on site's performance?

Inside my custom node--content-type.tpl.php at the top I put:

Pages

Subscribe with RSS Subscribe to RSS - Theme development