This forum is for assistance with theme development.

Views 3.6 Displaying multiple identical items

Hi Guys,

I need your help, PLEASE!

I have view block, displayed on my homepage. And in that view I'm simply displaying all my articles.
I have only 3 articles, but when I go to the homepage, every article is repeated 7 times.
I'm using:
Filter criteria
Content: Published (Yes)
Content: Type (= Article)

Everything is looking fine in the view preview, but when I go to the homepage, the articles are repeated.
I've tried checking the "Distinct " checkbox but nothing changed.

Customising the template_files path for webform templates

Hi guys, big fan!

Coming across my first ever Drupal confusion. I have a local server, a staging server and a live server. These all have separate databases. I'm having a problem where I'm naming my webform template webform-form-6451.tpl.php and this is not corresponding to the staging or live server as when the webforms are created on these sites, they are issued with different IDs. I have managed to fix this issue for pages and nodes by simply using the hook_preprocess_node (something that only took me a couple of days to test and implement) however, I can't find how to do the same for webforms.

Ideally, if my webform were located at:

http://www.example.com/this-is-the-url-of-the-webform

I would want the template file to be named after the path alias as:

/sites/all/themes/themename/webforms/webform-form-this-is-the-url-of-the-webform.tpl.php

How can I go about this?

The code I used to do this for nodes is as follows:

function themename_v2_preprocess_node(&$vars, $hook) {

$suggestions = array();

// get node based on node ID
$suggestions[] = 'node-'. $vars['nid'];

// additional node template names based on path alias
if (module_exists('path')) {

// we already can have a path alias
if (isset($vars['node']->path)) {
$alias = ($vars['node']->path);
} else {
// otherwise do standard check

Linking additional information to content types

Hi,

I'm building a website that references products, which are in different areas across the site. it's not an ecommerce so I'm creating them using content types at the moment.

First question is can you hide certain fields assigned to custom content types to set pages. Login protected pages etc.

Comment text box is too large / bartik theme drupal

Hi
Does anybody know how to change height in drupal comment box (theme bartik)? After saving a simple and small comment "Hi" appears comment box with some extra empty lines. (standard box for every comment)

Looks like:

User Hi
* empty space
* empty space
* empty space
* empty space
* empty space
* empty space

Make Bootstrap theme look like the screenshot

So I installed the Bootstrap theme, and it looks pretty bare compared to the screen shot on its homepage. I've searched their website, and Drupal, and Google for spent a good two hours to find instruction on how make my website look like the homepage screen shot. Usually when I install other themes, the theme populates and arranges content the way in looked like their project page, so I know where to tweak where needed.

Where can I find help to make the bootstrap theme look similar to what is advertised on the homepage at /projects/bootstrap?

Question about editing the PHP file

Hello,

So I've been editing my html.tpl.php file and adding custom stuff.

However, there's an issue. In this file, not all elements are defined by themselves.
Instead there's PHP code to just throw elements on the page.
This makes it pretty difficult for me to place custom HTML, for example a table, because I don't know where it will end up.

http://i.imgur.com/bTV5d9g.png

Pages

Subscribe with RSS Subscribe to RSS - Theme development