Search: concept

Last modified by Vincent Massol on 2014/10/21

Results 1 - 2 of 2 Page 1

Semantic Tagging Extension

Located in
Last modified by Vincent Massol on 2024/07/05
Attachment content
xwiki-semtag-component/documentTags.vm #template("xwikivars.vm") #set($tagsId = 'xdocTags') #set($tagErrorMessage = '') #set($xredirect = $util.encodeURI($doc.getURL('view', "#${tagsId}"))) ## ## ## #macro(displayTag $tag) #if($tagger) #displaySemanticTag($tag) #else <span class="tag-wrapper"><span class="tag"><a property="ctag:label" href="$xwiki.getURL('Main.Tags', 'view', "do=viewTag&amp;tag=$tag")">$tag</a></span>#if($hasedit)<span class="separator">[</span><a href="$doc.getURL('view', "xpage=documentTags&amp;xaction=delete&amp;tag=${tag}&amp;xredirect=${xredirect}")" class="tag-tool tag-delete" title="$msg.get('core.tags.remove.tooltip')">X</a><span class="separator">]</span>#end</span> #end #end #macro(displaySemanticTag $tag) #set($semTag = $tagger.fetchSemanticDetails($tag)) <span class="tag-wrapper"><span class="tag"><a href="$xwiki.getURL('Main.Tags', 'view', "do=viewTag&amp;tag=$tag")">$tag</a></span>#if($hasedit)<span class="separator">[</span><a class="tag-tool tag-list-activator" href="#"> ▼</a><span class="separator">]</span> <div class="conceptList" style="display:none"> #if($semTag.getSemanticDetails().size() == 0) $msg.get("semtags.nodetails") #end #foreach($detail in $semTag.getSemanticDetails()) <span typeof="ctag:Tag" rel="ctag:means" resource="$detail.getUri()" property="ctag:label" content="$detail.getLabel()"><a class="tag-concept-link" href='$detail.getUri()'>$detail.getLabel()</a></span> <br/> #end #set($dbpediaImg = $xwiki.getDocument("SemTags.CreateTagForm").getAttachmentURL("dbpedialogo.png")) <div id="more-at">Powered by <img src='$dbpediaImg' alt="Dbpedia"/></div> </div> <span class="separator">[</span><a href="$doc.getURL('view', "xpage=documentTags&amp;xaction=delete&amp;tag=${tag}&amp;xredirect=${xredirect}")" class="tag-tool tag-delete" title="$msg.get('core.tags.remove.tooltip')">X</a><span class="separator">]</span>#end</span> #end #macro(removeTag $tag) #if($xwiki.tag) #set($result = $xwiki.tag.removeTagFromDocument($tag, $doc.fullName)) #if($result == 'OK' && "$!
_htmlheader.vm xwiki-semtag-component/tags.js // ===================================== // Drop Down // ===================================== var consolelog = function(l) { if(typeof(console) == 'object' && typeof(console.log) == 'function') console.log(l); } // ====================================== // Ajax tag editing // // Make sure the XWiki 'namespace' exists. if (typeof(XWiki) == 'undefined') { XWiki = new Object(); } // Make sure the viewers 'namespace' exists. if (typeof(XWiki.viewers) == 'undefined') { XWiki.viewers = new Object(); } /** * Tag editing. */ XWiki.viewers.Tags = Class.create({ /** * Initialization: add listeners for all tag actions, to perform them via AJAX */ initialize : function() { // delete tags $$('.doc-tags .tag-delete').each(this.ajaxTagDelete); // [semtag] concept list for each tag $$('.doc-tags .tag-list-activator').each(this.ajaxTagConcepts); // [semtag] end concept list for each tag $$('.doc-tags .tag-add a').each(this.createTagAddForm.bind(this)); if ($$('.doc-tags .tag-add-form').length > 0) { this.ajaxifyForm($$('.doc-tags .tag-add-form')[0]); } }, /** * [semtags] add list of concepts */ ajaxTagConcepts : function (item) { item.observe('mouseover', function(event) { if (event) { event.stop(); } if (!item.disabled) { new Ajax.Request( item.href.replace(/&xredirect=.+$/, "&ajax=1"), { onCreate : function () { // ignore "cascade" clicks item.disabled = true; }, onSuccess : function () { // display the concept list var conceptList = item.next('.conceptList'); //consolelog("conceptList = " + conceptList.innerHTML + " item=" + item); var tagConcepts = new XWiki.Tooltip(item, conceptList.innerHTML, {'class': 'conceptList', mouseFollow: false}); }, onFailure : function (response) { new XWiki.widgets.Notification(response.responseText || 'Server not responding', "error"); }, // 0 is returned for network failures, except on IE where a strange large number (12031) is returned.

Creating a FAQ Application (Manual)

Last modified by Simon Urli on 2023/10/10
Rendered document content
In addition, this tutorial will introduce the concepts of Authoring Templates and Page Design Sheets, patterns that you will find particularly useful in creating XWiki applications.
If you previously chose to use a "Custom creation form" for creating new FAQ entries, follow these steps: Go to FAQ.WebHome Below the "Add a new question" header, enter a question (which will also be used as the document title) in the Document field Click Create this FAQ You can then enter your question in longer form using the Question field on the template, like this: Click Save & View and then you will see the newly created document, like this: Go back to the FAQ.WebHome page (you can use the breadcrumbs) to see the list of existing questions Conclusion This tutorial has taught you how to use the Class Wizard app and it has detailed the concepts of classes, objects and properties and introduced the authoring templates and page design sheets.
You can use these basic concepts to build custom applications at the document or presentation layer of XWiki without having to compile or deploy code.
Raw document content
In addition, this tutorial will introduce the concepts of Authoring Templates and Page Design Sheets, patterns that you will find particularly useful in creating XWiki applications.
If you previously chose to use a "Custom creation form" for creating new FAQ entries, follow these steps: * Go to ##FAQ.WebHome## * Below the "Add a new question" header, enter a question (which will also be used as the document title) in the //Document// field * Click //Create this FAQ// * You can then enter your question in longer form using the //Question// field on the template, like this:((( {{image reference="FAQSheetEdit.PNG"/}} ))) * Click //Save & View// and then you will see the newly created document, like this:((( {{image reference="FAQSheetView.PNG"/}} ))) * Go back to the ##FAQ.WebHome## page (you can use the breadcrumbs) to see the list of existing questions((( {{image reference="FAQsWithEntry.png"/}} ))) = Conclusion = This tutorial has taught you how to use the Class Wizard app and it has detailed the concepts of classes, objects and properties and introduced the authoring templates and page design sheets.
You can use these basic concepts to build custom applications at the document or presentation layer of XWiki without having to compile or deploy code.
Page 1
RSS feed for search on [concept]

Get Connected