img classes gone in WebYep 1.7?

General discussions about WebYep
Post Reply
Eelco
Rank 1
Rank 1
Posts: 25
Joined: Sun Sep 18, 2011 1:50 pm

img classes gone in WebYep 1.7?

Post by Eelco » Sun Sep 18, 2011 1:59 pm

Hello,

An older website I have made with WebYep needed some tweaks and I thought I might as well upgrade the WebYep system. However, it seems I cannot use img classes anymore? I cannot find anything about assigning classes in the new documentation…
:( ?

marcus
Objective Development
Objective Development
Posts: 170
Joined: Tue Nov 30, 2010 1:25 pm

Re: img classes gone in WebYep 1.7?

Post by marcus » Mon Sep 19, 2011 11:38 am

Eelco wrote:An older website I have made with WebYep needed some tweaks and I thought I might as well upgrade the WebYep system. However, it seems I cannot use img classes anymore? I cannot find anything about assigning classes in the new documentation…

You can still assign classes (or other HTML attributes) to an image by providing them in the third parameter to the webyep_image() function call.
This code would add a CSS class 'myImage' to an image managed by WebYep:

Code: Select all

<?php webyep_image("Image", false, 'class="myImage"', "some_other_page.php", "", 700, 900, true, 70, 90); ?>

Please note that the use of custom attributes for the image element has been deprecated.
WebYep still supports custom attributes but we strongly encourage you to use other means to address elements since this might change in a future version.

One way to do this would be to wrap a WebYep image in a <div> with a class name (e.g. 'wyImgWrapper'):

Code: Select all

<div class="wyImgWrapper">
  <?php webyep_image(...) ?>
</div>
so you could address it like:

Code: Select all

.wyImgWrapper img {...}

Eelco
Rank 1
Rank 1
Posts: 25
Joined: Sun Sep 18, 2011 1:50 pm

Re: img classes gone in WebYep 1.7?

Post by Eelco » Mon Sep 19, 2011 8:38 pm

One way to do this would be to wrap a WebYep image in a <div> with a class name (e.g. 'wyImgWrapper'):

O.k: I had thought about that and I will do that. Thank you for your reply.

…gets me curious about the future development plans, though!

Post Reply