Thanks Saq! I'm struggling with the URL part specifically, how do I grab 
that? Thanks so much.

---

For context, my live notes while looking for a solution :)

   - Some 
   <https://www.google.com/search?q=tiddlywiki+display+url+of+current+tiddler> 
of 
   the results of a google search, nothing relevant
   - Maybe I need a list-links macro 
   <https://tiddlywiki.com/#list-links%20Macro> with a filter operator 
   <https://tiddlywiki.com/#Filter%20Operators> targeting the current 
   tiddler. But only the link-related operators I found on the list were 
   *backlinks*, which finds the titles that link to each input title, and 
   *links*, which finds the titles linked to by each input title.
   - Found TiddlerLinks <https://tiddlywiki.com/#TiddlerLinks>, but doesn't 
   look like it's related to what I want to achieve
   - I typed {{!!title}} in google and found this Current Tiddler 
   <https://tiddlywiki.com/static/Current%2520Tiddler.html> page, which was 
   super promising but looks like the currentTiddler Variable only contains 
   the title of the current tiddler
   - This plugin 
   <https://groups.google.com/forum/#!topic/tiddlywiki/m-IYUzd9Bio> seems 
   to create links to the current tiddler, so it means it's possible!

On Friday, April 24, 2020 at 11:51:31 PM UTC+1, Saq Imtiaz wrote:
>
> You want something like this:
>
> \define tweet-this(url,title,description)
> <a href="
> https://twitter.com/intent/tweet?source=$url$&text=$title$%20$description$&via=anthilemoon";
>  
> target="_blank" title="Tweet"><img alt="Tweet" 
> src="social-icons/Twitter.png" /></a>
> \end
>
> <$macrocall $name="tweet-this" url=<<url>> title={{!!title}} 
> description={{!!description}} />
>
> put the define at the top of your template and call the macro with the 
> macro call widget where you need it. That assumes you have a variable set 
> that contains the value of the url under the name url
>
> Further reading: 
> https://tiddlywiki.com/#Concatenating%20text%20and%20variables%20using%20macro%20substitution
>
> On Saturday, April 25, 2020 at 12:22:17 AM UTC+2, Anne-Laure Le Cunff 
> wrote:
>>
>> Hi everyone,
>>
>> I'm trying to add social sharing links on each page of to my TW-generated 
>> website, here is an example:
>>
>> <a href="https://twitter.com/intent/tweet?source=*{URL}*&text=*{TITLE}*
>> %20*{DESCRIPTION}*&via=anthilemoon" target="_blank" title="Tweet"><img 
>> alt="Tweet" src="social-icons/Twitter.png" /></a>
>>
>>
>> Where {URL} the url of the current tiddler, {TITLE} is the title of the 
>> current tiddler, etc.
>>
>> My question is: what am I supposed to use to generate these? (in the 
>> static view template tiddler)
>>
>> For example, for *{TITLE}* I tried *<$view field="title"/>* and 
>> *{!!title}* and none of them worked.
>>
>> Couldn't find anything in this list 
>> <https://tiddlywiki.com/static/TiddlerFields.html>.
>>
>> Thank you!
>>
>> p.s. attached a fun screenshot for your pleasure.
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0827f810-9882-4853-a681-832614f73a6d%40googlegroups.com.

Reply via email to