SSX on demand not working

Hello,
I don’t know if I’m doing something wrong but I follow the steps on the skin extension tutorial.
I want to make some code for my images located only on my homepage.
So I wrote down my code and chose “on demand only” ( And my next step would be to apply the velocity on wiki content of my homepage)
When I save my code I notice that my code was affecting all images of my wiki… Can you help me?

here is a print:
image

Would you be able to post a bigger screenshot or the code snippet itself? I can’t read - its too small.
On which page did you create the skin extension? Could it be that you affected all child pages?

@dahin thank you.
The code snippet
img {
-webkit-transform: scale(1);
transform: scale(1);
-webkit-transition: .3s ease-in-out;
transition: .2s ease-in-out;
}

img:hover {
-webkit-transform: scale(1.05);
transform: scale(1.05);
}

On my page “homepage” (that has no children) I have created this object where the properties are:
use this extension: on demand only
Parse content: No
Caching policy: Default
Content Type: —

My point was then on my wiki content of my homepage use the velocity to apply this object. But doing nothing it is working with all images of my wiki.

image
image

Judging by your breadcrumb trail, could it be that your “homepage” is you main page and thus all other pages are inherently subpages to this one? (I have no idea, just guessing why this behavior would occur)

1 Like

@dahin thank you. Your argument changed my strategy.
So, in the wiki content of my page ‘homepage’ I parameterized a class on the photos that I wanted the effect.
Like this:
image

Then I just changed my code snippet (In my object) with the new class:
image

And Voilá!

It’s working properly now :slight_smile:

1 Like

Note that you could even create a wiki macro to make it easier to use. It’s very easy to do, see https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/WritingMacros/WikiMacroTutorial/

1 Like

Nice! I didn’t know that :slight_smile: Thanks!