howto change design of article nodes page

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
hezten's picture

This might be a stupid question. But how do i change the design of the article page ?

I tried looking in the file

/var/www/data-debug.dk/openpublish/sites/all/themes/openpublish_theme/views/articles/views-view--articles--page.tpl.php

but i couldnt figure it out. I made some changes to the file and tried clearing the cache, but the changes did not reflect the rendered pages. I want to add a quote block to the article pages just like this page:

http://politiken.dk/kultur/scenekunst/ECE1228764/skandaleramt-spiderman-...

like the box with this text

"Hun er blevet kendt for at bruge penge som en gal, og flere tidligere samarbejdspartnere har bemærket, at det var godt, Disneys stramme koncept holdt hende tøjret."

i added a new field to the articles content type named "quote", and want to implement that box in the articles design. But only show the box if there is any text in that field.

Any help much apriciated.

Comments

you probably need to look at

resveld's picture

you probably need to look at the node rendering too.

sites/all/modules/openpublish_core/theme_helpers/node-article.tpl.inc is where to look :)

-Ronald

hmm how does this relate to

hezten's picture

hmm how does this relate to the theme design ?

  // Main Image
  if ($vars['field_main_image'][0]['filepath']) {
    $vars['main_image_credit'] = $vars['field_main_image_credit'][0]['view'];
    $main_image_title  = $vars['field_main_image'][0]['data']['title'];
    $main_image_desc = $vars['field_main_image'][0]['data']['description'];
    $vars['main_image'] = theme('imagecache', '400xY', $vars['field_main_image'][0]['filepath'], $main_image_title, $main_image_title);
  }

i can se variables being defined, but i cannot se any design echo as html ?

maybe

FanisTsiros's picture

i think sites\all\themes\openpublish_theme\node\node-article.tpl.php is the file to change the design

sites/all/themes/openpublish_theme/views/articles/views-view--articles--page.tpl.php is for views articles not for article.

i have found the place where

hezten's picture

i have found the place where the articles page is designed, but the body part is only 1 variable. Where do i find the body variable definition ?

this is the file i found

/var/www/data-debug.dk/openpublish/sites/all/themes/openpublish_theme/node/node-article.tpl.php

but the body part is coded like this

<div property="dc:description"><?php print $body; ?></div>

This contains the intire body part of the article. I want to put the quote div box INSIDE of the article body, how do i do this ? Do i maybe need to rewrite the output of the article body ? and how do i do this when the article layout is not defined as a view ?

Aren't you looking a bit too

IFAM's picture

Aren't you looking a bit too hard into this? Why do you want to hardcode the block in? It's obviously just their blockquote.

Edit html-elements.css in your subtheme and find '

<

blockquote>' and style it accordingly. Something like;

background:#f3f3f3;
float:right;
width:200px;
+font
+rounded corners
etc.

... should do it.

If you want the quotation marks, just add it as an image into the css.

The advantage of you doing this is that you can put it in as many times as you like and where you like!

doh !!! *facepalm" why didnt

hezten's picture

doh !!! *facepalm" why didnt i just think of that. That is now fixed. Here is example

http://debug.dk/article/knut-genopst%C3%A5r-som-b%C3%A6ver

let me know what you think ?

Thanks for your input.. that helped me alot.

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week