Jump to content

Recommended Posts

Posted

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!

Posted

Short answer no. ProcessWire does not generate or output any markup. Any markup you add is your own. Maybe if you explained your situation we could show you how to go about it.

Posted

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.

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
  • Recently Browsing   0 members

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