Of possible relevance: URI operators 
<https://tiddlywiki.com/prerelease/#:%5B%5Bencodeuri%20Operator%5D%5D%20%5B%5Bdatauri%20Macro%5D%5D>.
 
Do TW search for more.

<:-)



On Saturday, April 25, 2020 at 5:22:52 AM UTC+2, Mark S. wrote:
>
> Hi Anne,
>
> Use Eric's way. I vaguely remembered that there was a way to do this, but 
> searching for "url" flooded me with 148 non-title hits. Maybe there needs 
> to be some redirect tiddlers that will help future searchers find this 
> easier.
>
> Might work like this:
>
> *<div class="test1">{{**$:/info/url/full}}</div>*
>
> *<div class="test2"><$view tiddler="**$:/info/url/full" 
> field="text"/></div>*
>
>
>
> However, per Tony's comments, I'm not sure this will do what you want when 
> generating static pages.
>
> Go ahead and delete the getLocationPath tiddler since it's no longer 
> needed.
>
> On Friday, April 24, 2020 at 6:15:16 PM UTC-7, Anne-Laure Le Cunff wrote:
>>
>> @Mark - I imported your file in a safe copy of my TW, then added the 
>> following to my static view template file:
>>
>> *<div class="test1">{{!!url}}</div>*
>>
>> *<div class="test2"><$view field="url"/></div>*
>>
>>
>> ... Because I wasn't sure what to use. But, in any case, none of them 
>> worked, there was no output. So I think I didn't understand the 
>> instructions properly.
>>
>> @Eric: Thank you! This does look somewhat related to what I want to do. 
>> I'll have a look.
>>
>> On Saturday, April 25, 2020 at 2:03:19 AM UTC+1, Anne-Laure Le Cunff 
>> wrote:
>>>
>>> Thanks so much, Mark! Will give it a try and report back :)
>>>
>>> On Saturday, April 25, 2020 at 1:59:47 AM UTC+1, Mark S. wrote:
>>>>
>>>> I was following this thread, hoping that someone would know of an 
>>>> existing, core-based solution. The two related messages unfortunately only 
>>>> send the url to the clipboard.
>>>>
>>>> If you want to try something, the attached is a json for a tiddler that 
>>>> uses a simple javascript macro to report the url. It worked for me. Once.
>>>>
>>>> Absolutely make a *backup* of any work you are doing. Then drag and 
>>>> drop into your TW. Save. Reload. Then <<url>> should reveal the url. Maybe 
>>>> ;-)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Friday, April 24, 2020 at 5:50:28 PM UTC-7, Anne-Laure Le Cunff 
>>>> wrote:
>>>>>
>>>>> @Saq & Tony: thank you! No idea what my URL structure is, I think it's 
>>>>> just the title and then I used regex to replace the spaces with hyphens, 
>>>>> so 
>>>>> I have no idea where to start here.
>>>>> @Scott: this is great! I have literally no idea how I could implement 
>>>>> this on mine (also I don't want the dynamic thing, just regular links), 
>>>>> but 
>>>>> yes, very close to what I want to do. Thanks!
>>>>>
>>>>> Doesn't happen often, but I think this one is past my competence 
>>>>> level, I don't even know what question to ask haha. I'll just forget 
>>>>> about 
>>>>> the social media links for now, not essential anyway. Thanks so much 
>>>>> everyone, really appreciate you jumping in :)
>>>>>
>>>>> p.s. If anyone more technical than I am wants to implement this at 
>>>>> some point, this <https://simplesharingbuttons.com/> is what the 
>>>>> html/css code looks like (demo attached).
>>>>> p.p.s. For SEO, social media reasons, etc. it would be great to have a 
>>>>> user-friendly way to call a link to the current page. Maybe 
>>>>> {{!!current}}? 
>>>>> I'm actually taking notes so I can publish a guide to make your 
>>>>> TiddlyWiki 
>>>>> more SEO friendly and this would be very helpful.
>>>>>
>>>>> On Saturday, April 25, 2020 at 12:49:32 AM UTC+1, Scott Kingery wrote:
>>>>>>
>>>>>> Anne-Laure, did you see this? 
>>>>>> https://ibnishak.github.io/Tesseract/pluginsandmacros/socialmacros/index.html#Social%20Networking%20comes%20to%20TW5
>>>>>>
>>>>>> I haven't used it but I found it over on Dave's Toolmap site
>>>>>>
>>>>>> Scott
>>>>>>
>>>>>> On Friday, April 24, 2020 at 3:22:17 PM UTC-7, 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fadcb349-750c-49fb-80d2-87fc38d928d2%40googlegroups.com.

Reply via email to