drupal-6


How do you separate the template of a blog block in Drupal?


In Drupal, I created a block using views. This block contains the latest blog entries. I've placed this on a specific page to display it as an archive. Now, as for the blog itself (for example when one of them is clicked), A blog template for it depends on node-blog.tpl.php. My problem is, when I style node-blog.tpl.php, the block I created for the archives (as it displays on the page) gets affected.
For example if I add TEST on node-blog.tpl.php, I will also get that on the block for every entry. I think it's because it is associated to a blog entry? What I want is to have node-blog styled "alone" when blog entries are viewed individually and not get the other entries on the blocks on the archive page be affected. How should I do this?
In your view you are probably using the "node" row style. This means that each blog in your block view is displayed as a full node and will be affected by node-blog.tpl.php
The easiest way to fix this is to change row style to "fields" and select the individual fields to display in the view. Then you can individually theme each field using the view's custom .tpl.php files (you can click on Theme: Information in the view to see scanned tpl.php files).
Another way to fix this would be to select "teaser" build mode in the row style settings. Then in node-blog.tpl.php do something like the following:
if ($teaser) {
//Display stuff for the block
}
else {
//Display stuff for the full page
}

Related Links

Access to only few fields of a content type for specific user
Where do I see Drupal source code
Lightbox2 and youtube videos
drupal 6 - unset previously set cck field validation error messages
display only the content of a page in lightbox2 in drupal
Drupal show error when move to the new Hosting [duplicate]
Ubercart 2.x - Add produkt line to order via php
How to display html content in block in Drupal 6?
How to use Drupal View
relate registered user to specific content in drupal 6
How to link a user with taxonomy terms
Populating a view in Drupal
Drupal Views 6.x-2.x not rendering correctly
What is the relationship between the primary menu links and secondary menu links in drupal?
Drupal 6 Availability of View Basic Settings Variables
DRUPAL6 FORM FAPI WITH DRUPAL_RENDER

Categories

HOME
clips
oracle11g
appx
electron
v8
ckeditor
iggrid
dacpac
python-unittest
floating-action-button
imacros
qt-creator
remote-access
windows-server-2012
clojurescript
openrefine
propel
shared-hosting
conemu
intentfilter
sqlcipher
tdd
su
semantic-analysis
url-scheme
traffic
media-queries
google-rich-snippets
caret
mapbox-gl
vxworks
starteam
angularjs-factory
broadcastreceiver
particles.js
preconditions
galen
gulp-sourcemaps
texmaker
vao
outlook-api
pango
dandelion
dropbox-php
np-complete
capacity
flow-control
spring-cache
account-kit
nested-sets
parallel-data-warehouse
wdf
sts-springsourcetoolsuite
home-directory
azure-virtual-network
xml-attribute
plottable.js
sigabrt
packagist
wso2cloud
ruby-2.2
qdialog
android-listview
oberon
rdl
terminfo
funcunit
reactfx
datagridviewcolumn
ember-charts
app42
pyhdf
sitemesh
inbox
tws
dataservice
html4
padarn
cisco-jtapi
dsn
armcc
twrequest
hosts-file
subscript
stage
qt-jambi
android-sdk-2.1
mongomapper
yslow
revisions
backcolor
swing-app-framework
noscript
private-members
msdev
document-conversion

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App