drupal-6


drupal body class


drupal version is 6. just want to know where are those $body_classes comes form.
I knew in template_preprocess_page , there is a variable called 'body_classes'.
but my problem is, not all body_classes are come from preprocess page.
for instance:
I have a term named 'activities and attractions', then in my page.tpl.php, there is a class
'page-activities and attractions' in my tag. looks like taxonomy module generates a body_class, but i could find it after search seource code of taxonomy module.
A module (such as taxonomy) generally does not override page template variables. Though it could be done by providing custom preprocess functions in hook_theme_registry_alter(). (See the context module for example)
The class 'page-activities-and-attractions' is most likely coming from template_preprocess_page() in includes/theme.inc on line 1894
$body_classes[] = preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. form_clean_id(drupal_strtolower(arg(0))));
This adds a body class for the first part of the drupal path.
For example, the path "node/1" would have a body class "page-node" and the path "taxonomy/term/1" would have a body class "page-taxonomy".
If you have a path "activities-and-attractions" (maybe from the page display of a view?) then you will get a body class "page-activities-and-attractions".
Note: This uses the internal Drupal path not url aliases. The alias "content/mypage" may really be "node/12" internally so the body class will be "page-node" not "page-content".

Related Links

Using multiselect module in custom module (drupal 6)
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

Categories

HOME
listview
reflection
alfresco
setup-deployment
cmd
malloc
v8
volttron
spring-xd
modx-revolution
resize
google-cloud-spanner
windows-azure-storage
decimal
dynamics-crm-online
designer
netflix
clearcase-ucm
pugjs
invantive-sql
reactcsstransitiongroup
crystal-reports-2008
predix
custom-wordpress-pages
nas
visjs
one-to-many
centos6.5
selectedindexchanged
greendao
fopen
facebook-apps
webkitspeechrecognition
primitive
madlib
siesta-swift
noraui
pim
hockeyapp
service-discovery
particles.js
fedex
gzipstream
pdf-reactor
core-plot
node-sass
skeleton-css-boilerplate
apache-fop
atomicity
pango
qsslsocket
promela
veracode
idisposable
slickedit
pdfclown
mako
flow-control
gcsfuse
bind9
titanium-android
crosswalk-runtime
specrun
pintos
abcpdf9
autorest
bgp
rvest
bluemix-app-scan
browser-link
ios8-today-widget
srand
spim
lemon
metaclass
map-projections
sankey-diagram
fscommand
qpainter
tablelayout
google-style-guide
asp.net-web-api-odata
websocket4net
html-helper
neolane
googlemock
document-classification
doskey
algebraic-data-types
srs
dir
runtime.exec
blending
easy-install
batterylevel
eclipse-memory-analyzer
back-stack
mylyn
uiviewanimation-curve
cufon
inotifycollectionchanged
telerik-scheduler
subviews
paster
sproutcore-2
gamma
forums
rescale
uimenucontroller
boost-smart-ptr
defensive-programming
django-notification

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