Display URI as a raw link.

16 views
Skip to first unread message

Jun Matsushita

unread,
Aug 29, 2015, 11:59:21 PM8/29/15
to Wagneers
Hi there,

I've just installed Wagn and trying it for the first time. I've given a shot to semantic wikis in the past but they were too complex and wagn seems to be more user friendly while being very flexible.

I have quite a few questions that came up as I was trying to progress, so I'll just share my experience here:

I have created a CardType named Project. The Project+*type+*structure contains :

{{+home_page| labeled; title: Home Page}} 

Why is it that when I select a home_page+*right+*default of URI then I can see the link but not if I use *structure ?

Then what I'd like to happen is that when entering www.example.org as a URI, is for the actual url to be displayed *and* linked to the url, so rendering as <a href="www.example.org">www.exxample.org</a>

I'd also like for this rendered link to appear as a labeled card with the title Home Page.

So far I've been able to render:

Home Page: Home Page

When using {{+home_page| raw}} I have access to the URL, but can't simply wrap it in an <a> tag. 

I've also tried to the +special_link approach described here http://wagn.org/make_less_ambiguity_in_URI_links but to no avail.

One of the questions that arose when trying to figure this out was : can I create a custom view? i.e. define how a particular content is rendered?

I've been quite confused by how the Wysiwyg editor adds <spans> everywhere including around double curly brackets which seems to confuse the parser sometimes. Is there a way to deactivate it or use a plain text box (I saw the Idea about allowing markdown and I think that would be great)?

When trying to work with the +special_link approach I also tried to create a <a href="{{_left|raw}}">{{_left|raw}}</a> format but the editor seems to add a beginning slash. therefore linking to http://mywagnsite.org/http://www.example.org

I appreciate your help! Let me know if I should rather post these as support requests on wagn.org

Very best,

Jun


Ethan McCutchen

unread,
Aug 30, 2015, 12:33:45 AM8/30/15
to wagn...@googlegroups.com


On Sat, Aug 29, 2015 at 2:32 PM, Jun Matsushita <j...@iilab.org> wrote:
Hi there,

Hi!
 

I've just installed Wagn and trying it for the first time. I've given a shot to semantic wikis in the past but they were too complex and wagn seems to be more user friendly while being very flexible.

I have quite a few questions that came up as I was trying to progress, so I'll just share my experience here:

I have created a CardType named Project. The Project+*type+*structure contains :

{{+home_page| labeled; title: Home Page}} 

Why is it that when I select a home_page+*right+*default of URI then I can see the link but not if I use *structure ?


*default sets initial content, *structure overrides it.  In general, structure only makes sense when there are some relative card references (like "+home_page" above).

 
Then what I'd like to happen is that when entering www.example.org as a URI, is for the actual url to be displayed *and* linked to the url, so rendering as <a href="www.example.org">www.exxample.org</a>

there's a view for that called "url_link" .  URI is a new cardtype and is not yet well documented.

I'd also like for this rendered link to appear as a labeled card with the title Home Page.

hmm, I'm not sure we can do that well yet, but there's a workaround you can try.  (see below)

So far I've been able to render:

Home Page: Home Page

When using {{+home_page| raw}} I have access to the URL, but can't simply wrap it in an <a> tag. 

I've also tried to the +special_link approach described here http://wagn.org/make_less_ambiguity_in_URI_links but to no avail.

That one was tailored to search results.
 
One of the questions that arose when trying to figure this out was : can I create a custom view? i.e. define how a particular content is rendered?

You can certainly do this as a developer.  As a user, the current answer is sort of, though we're working on an approach that will make views genuinely customizable for Wagneers.

Basically, you can override the "structure" (content) of a card in a given nest (inclusion) like so:

{{+home_page| labeled; title: Home Page; structure: linked uri}} 

Then you can create a card (I recommend type HTML) named "linked uri" with something like:

{{_self|url_link}}

I'm confident you can get that to display what you want but not sure it will show up as you want in edit view.  If that's not working, let me know; I've had enough reports of related needs that we may be able to make a priority of fixing it.

 
I've been quite confused by how the Wysiwyg editor adds <spans> everywhere including around double curly brackets which seems to confuse the parser sometimes. Is there a way to deactivate it or use a plain text box (I saw the Idea about allowing markdown and I think that would be great)?

Yeah, that's annoying.  

The editor is tinyMCE, and there is a *tinyMCE card to configure it, but that's a nuisance.  We are looking at other editor options, but frankly we should make the parser a bit better at ignoring that stuff.

If you you just want plaintext you can set the type to most anything but Basic.  (PlainText, HTML, whatever).

I think Markdown would be a useful cardtype, too.

 
When trying to work with the +special_link approach I also tried to create a <a href="{{_left|raw}}">{{_left|raw}}</a> format but the editor seems to add a beginning slash. therefore linking to http://mywagnsite.org/http://www.example.org


tinyMCE again.  That would work with an HTML card.  
 
I appreciate your help! Let me know if I should rather post these as support requests on wagn.org

That would be great; they become a bit more of an integrated resource that way.  But thanks for reaching out!
 
Very best,

Jun


And best to you!

-ethan
 

--
You received this message because you are subscribed to the Google Groups "Wagneers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wagneers+u...@googlegroups.com.
To post to this group, send email to wagn...@googlegroups.com.
Visit this group at http://groups.google.com/group/wagneers.
For more options, visit https://groups.google.com/d/optout.



--
Ethan McCutchen
One of the Wagneers, Wagn.org

Wagn. How pioneers roll.

s: ethan.mccutchen
t: @intogreater

Reply all
Reply to author
Forward
0 new messages