Skip to content
Snippets Groups Projects
Commit 933894dd authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

referanselinker inneholder /{lemma}

parent 13322c36
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ export default {
computed: {
unparsed: function(){
let lang = this.$route.params.lang
let path_lemma = this.$route.params.lemma
return this.body.items.map(
function(item){
if (item.type_ == 'usage') return {type: item.type_, html: item.text, tag: 'mark'}
......@@ -33,7 +34,7 @@ export default {
type: item.type_,
html: '',
link_text: item.word_form || item.lemmas[0].lemma,
ref: item.article_id + (item.definition_id ? '#def' + item.definition_id : ''),
ref: (path_lemma ? '../' : '') + item.article_id + '/' + (item.word_form || item.lemmas[0].lemma) + (item.definition_id ? '#def' + item.definition_id : ''),
article_id: item.article_id,
definition_id: item.definition_id,
definition_order: item.definition_order
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment