Change the way links to missing pages are displayed

Hi all

I’m in the middle of generating xwiki pages from a database via REST. We’d like to have our documentation always up-to-date, so we’re taking whatever we can directly from the source. This part works perfectly :wink:

Some things need additional manual work. I decided to wrap [[ ]] around certain elements to create links. Thing is: Some pages contain tons of links which lead to documents that don’t exist yet (or will never exist). That looks aweful with all these questionmarks, really.

I have some ideas:

  • Only show links to existing pages:
    • Query XWiki first (POST), whether that subpage exists (= overkill)
    • Use some velocity magic (of which I have no clue) to determine whether a link needs to be created or not
  • Change the way links look like - but only on that page!
    • Add some CSS to the page to make links to nonexisting pages look different

The last option would be my favourite, but I don’t get how to achieve that. I already added some CSS to the flamingo thingy via XWiki UI, but that would be valid for the whole wiki (if it worked, which is not the case)…

Is there a way to set some CSS inside a page?

Thanks in advance

André

Yes, check http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial

1 Like

Thanks, I’ll give it a try! I used quite a few different keywords, but this one didn’t show up.