I am writing a FAQ page in restructuredtext and I would like to place a list of questions at the top with links to the answers further down the page. I wrote the following but the link doesn't go anywhere. What am I doing wrong?
`How are you associated with the University? `_
How do I create a hyperlink to a line number in reST?
I just found it here: http://docutils.sourceforge.net/docs/user/rst/quickref.html#example-callout
If you wrap the question in backquotes like this:
`How are you associated with the University?`_
then below you can reference the question like this:
.. _How are you associated with the University?:
Now, when you click on the question link it takes you to the correct line, all without using HTML.
Put anchor link tag on your your question:
How are you associated with the University?
...
Here is your answer:
<a id="n281"></a>
... Your n281 answer ...
Related
can someone please advice me on how I can display hyperlink words instead of the full pdf links on my whatsApp share text field, I have started with this:
https://wa.me/?text=Aqua-Right%203%20https://rolfesagri.co.za/wp-content/uploads/2021/01/Aqua_Right_3_Label-1.pdf, http://rolfesagri.co.za/wp-content/uploads/2021/01/Aqua_Right_3_SDS-1.pdf, http://rolfesagri.co.za/wp-content/uploads/2021/02/Aqua-Right_Range_Eng_Pamphlet.pdf
This link needs to look like this when you send it to someone:
Aqua-Right 3 Label, SDS, Pamphlet
Is this possible?
These are three different links and you need to treat a link using the <a> tag.
See the documentation for the detail but your code will look like:
Label
<a href="https://wa.me/?text=Aqua-Right%203%20http://rolfesagri.co.za/wp-content/uploads/2021/01/Aqua_Right_3_SDS-1.pdf>SDS</a>
<a href="https://wa.me/?text=Aqua-Right%203%20http://rolfesagri.co.za/wp-content/uploads/2021/02/Aqua-Right_Range_Eng_Pamphlet.pdf>Pamphlet</a>
This is completely untested on what the link itself will do but is the right syntax to display a link on a webpage
This is not a Question, just some advise I want to give to you.
After hours of googling and testing out, I didn't find a solution that worked on my lightbox. I don't know why, but I just couldn't apply a link into the title, not with htmlentities() etc.
So I came up with my own solution, which is just a workaround.
I'm not really satisfied with myself but it's the only way it works for me.
So, if you're having the same troubles like me, just add this line of code:
Search for this line of Code in lightbox.js (In my file it was the line 277):
$lightbox.find('.lb-caption').html(this.album[this.currentImageIndex].title).fadeIn('fast');
and replace it with this:
$lightbox.find('.lb-caption').html('<span onclick="window.location.href=\'http://yourdomain.com\'">'+this.album[this.currentImageIndex].title+"</span>").fadeIn('fast');
What did I do?
Since .lb-caption is added to display the title attribute, i just wrap the original output in an element and bind a click event to a certain location.
Problem with it:
Since I wrapped around the whole title attribute, the whole title attribute becomes a link.
To get the cursor: pointer; effect in css and your standard link layout, just make the title a link. In this way it doesnt has to be htmlentities() decoded link.
Example:
This link opens a new page
Another problem is: Now is the link static. (Since we're not using the href of our link).
Solution:
To add One $_GET Attribute to the link, we just need to fix a few lines.
What you do is, in your image call (the part) you add the attribute "rev", means:
Instead of This link opens a new page,
you now use (add the "rev" attribute"):
This link opens a new page
Now to the Javascript part...
Search for:
if ($link.attr('rel') === 'lightbox') {
this.album.push({
this part, and replace:
link: $link.attr('href'),
title: $link.attr('title'),
with
link: $link.attr('href'),
title: $link.attr('title'),
rev: $link.attr('rev')
If you go a few lines down you'll see the same part with link: $…., title: $…., replace that part with:
link: $(a).attr('href'),
title: $(a).attr('title'),
rev: $(a).attr('rev')
Now we just need to modify our wrapper: (Go back to now line 279, before the $_GET part it was line 277)
$lightbox.find('.lb-caption').html('<span onclick="window.location.href=\'http://yourdomain.comindex.php?page=contact&t='+this.album[this.currentImageIndex].rev+'\'">'+this.album[this.currentImageIndex].title+"</span>").fadeIn('fast');
We add now '+this.album[this.currentImageIndex].rev+' instead of the static part.
You can repeat this method to add infinite $_GET parameters, just add a new attribute to your image call, and change the javascript like we did in my explanation.
This is a really complicated and unusual way to solve the link in title problem, but its the only way how it will work in my script.
I hope that I helped someone! :)
I'm currently creating my first custom theme for Tumblr and I can't find any explanation of how permalink pages for posts and that post's notes work or how they are written, how do I go about this? what is the code needed and where is it implemented?
Anything you want to appear on a permalink only page you want to have wrapped in block:PermalinkPage tags. If you only want it to show on the index page, wrap it in block:IndexPage tags.
To get your notes to show use {block:PostNotes}{PostNotes}{/block:PostNotes}. This will only appear on a permalink page (despite it not being wrapped in block:PermalinkPage tags. {PostNotes} creates an ol tag with a class of notes for you to style in any way you'd like.
I'm trying to create a link in one Joomla article that points to another article, but can't see how this should be done.
Could you please tell me how to do it?
You can link to it like this:
index.php?option=com_content&view=article&id=ARTICLE_ID
Use the JCE Editor. Then follow these steps.
Select the 'link' option
Select browse/content
Select the content item
Select 'insert'.
This is one method, but there are many others. The example uses Joomla 2.5 but the same process is used in Joomla 3.0.
To create internal linking between different div or p just create links like this
Go to div one
Note: must add full URL of current article and then add #name.
<div><a name="div1">Here is div one</a></div>
I am looking for a Ruby script that takes a piece of text, and makes any links click-able that show up in it... Does anyone have something like this? For example, if I wrote a comment and said "Come check out my site at http://www.example.com", then the link would be click-able like an html tag.
Thanks,
Josh
Rails has a View helper called auto_link, e.g.:
<%= auto_link("Please visit my site: http://www.example.org/") %>
would produce:
Please visit my site: http://www.example.org/
Update: You can find more information about it here.