Jump to content

Show all classes on a div?


OpenBayou
 Share

Recommended Posts

Hi,

I'm new to ProcessWire so forgive me if this question has been asked. In WordPress, there's an option to show all classes of any div. For example, if this is my body:

<body <?php body_class(); ?>>

it outputs the following:

<body class="page page-id-2 page-parent page-template-default logged-in">

 

Does ProcessWire have something similar?

Thanks!

Link to comment
Share on other sites

Plan B:

Is there a way to add a class to a body based on template on the page? I have three templates in theme: home, recommendations and ads.

Example: If the main page uses 'home' template:

<?php if template=home : ?>

<body class="home">

<?php endif;?>

 

Hope this clears it up.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...