Hi Alex,

> On 25 Aug 2016, at 09:31, Alexandru Cotiuga <alexandru.coti...@xwiki.com> 
> wrote:
> 
> Hello Steve,
> 
> Since you didn't mention it in your steps to reproduce, I presume that your
> page is a non-terminal one (at creation, it was not marked as terminal) and
> thus you page's fullname should be Sandbox.StyleTest.WebHome. In order to
> make you SSX work, you need to use #set($discard =
> $xwiki.ssx.use("Sandbox.StyleTest.WebHome")).

Would be great if you could review the tutorial and fix it since it’s probably 
wrong now that pages are created non-terminal by default:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial

> We advice to use a variable ($discard) to capture the methods that don't
> create output when called from velocity.


Thanks!
-Vincent

> Hope this helps,
> Alex
> 
> 
> On Wed, Aug 24, 2016 at 11:03 PM, Stephen Martin <ste...@jonesmetal.com>
> wrote:
> 
>> In learning Xwiki, I am trying to use a Style Sheet Extension to apply CSS
>> to only a group of pages. I have been following the Skin Extension Tutorial
>> (http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial)
>> and placing all of my work in the Sandbox.
>> 
>> The issue I am having is that when setting "Use This Extension" to On
>> Demand Only the CSS is not applied but when setting "Use This Extension" to
>> On This Wiki it works correctly.
>> 
>> What I have done:
>> 
>> 1.       Created new page called StyleTest located under Sandbox.
>> 
>> 2.       Added XWiki.StyleSheetExtension object to page.
>> 
>> 3.       Named object StyleTestStyleSheet.
>> 
>> 4.       Added the following in Code:
>> label {
>>  font-family: "Times New Roman", times, serif;
>> }
>> 
>> 5.       Set "Use This Extension" to On Demand Only, "Parse Content" to
>> No, "Caching Policy" to Default, "Content Type" to CSS.
>> 
>> Next I created a new page named Another Test Page and entered the
>> following code:
>> 
>> {{velocity}}
>> $xwiki.ssx.use("Sandbox.StyleTest")
>> {{html wiki=true}}
>> (((
>>  ; <label>Name Label</label>
>>  : Name
>>  ; <label>Blank Label</label>
>>  : Blank
>>  ; <label>Lube Type Label</label>
>>  : Lube Type
>> )))
>> {{/html}}
>> {{/velocity}}
>> 
>> We are currently using  XWiki Enterprise 7.4.4.
>> 
>> What am I doing wrong?
>> 
>> Thanks,
>> Steve
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to