Join a conversation, pose a question, or help a fellow user: The best place to discuss all things Karelia.
You are not logged in.
Hi All,
In Sandvox 1 it was really easy to add an anchor tag by editing the raw html. As far as I can see, this is no longer possible in Sandvox 2. Can this be correct? Am I missing something?
Would be grateful if someone could point me in the right direction.
Thanks,
Dave
Offline
Would you provide an example of what sort of anchor tag you were using and for what?
Offline
Hi Terrence,
I have been using anchor tags to link from the top of a lengthy text page to various points further down the page. In Sandvox 1 this was pretty simple to achieve by using "Edit Raw HTML".
I was stumped how to do this in Sandvox 2, but have now figured out how to do it using html objects. It seems a bit more work but I can see the advantages of doing it this way. It's just a different way of working I guess.
For anyone interested, this is the code I use. Of course, change the text and the name of the link to your own requirements.
First HTML Object:
<span><a href="#mylink">
Go to my link</a></span>
Second HTML Object:
<span><a name="mylink">Here is my link</a></span>
My next task is to figure out how to do mouse-over "title" tags on images.
Regards,
Dave
Offline
OK, glad you figured it out in Sandvox 2!
Offline
I am (we are) converting Sandvox 1 sites to Sandvox 2 and those sites have a "Top_of_Page" anchor tag in the site title. It's important to have the tag there because otherwise "Return to top" links will not jump all the way to the top of the page.
There is no way as far as I can tell to add an HTML object to the site title so the solution posted here does not work in this case. For the moment when creating new anchor tags we create them with "Edit raw HTML" in Sandvox1 and copy that text (not raw HTML, just the WYSIWYG text) to Sandvox2 which retains the embedded anchor tags even though we cannot see them in the UI - they publish just fine. However it is cumbersome to keep track of where we actually have anchor tags and how we spelled them. The conversion from Sandvox1 to Sandvox2 does retain all existing anchor tags as well, but it is still cumbersome to maintain.
Sandvox2 does recognize the anchor "<a name=..." as a "link" because when we hover over an anchor tag (or text that is within an "<a name=...") we can see the "edit link" tool button activate - however when we try to edit the link it appears empty. For me the "edit link" tool appearing upon hovering over an anchor tag is important because they otherwise appear the same as normal text due to the css in our design.
Similarly for links that jump to anchors (<a href="#...), Sandvox2 recognizes the link. It allows us to view the link in the inspector, but if we try to edit the link Sandvox2 blanks the edit field - there is no way to enter any kind of relative link like #myLink or ../../MyPage#MyLink. We use these relative links extensively and it will be cumbersome to maintain them with the different create and edit methods for different types of links.
It would be great if the link inspector allowed for relative links as well as anchor tags. Then we could use the same procedure for all links and anchors. Let me know if there is an easier, less cumbersome workaround than we are already using or if any changes are planned for the link inspector.
Thank you!
-Lee
Offline
Hi guys, I'm going to look into improving this for Sandvox 2.2.
Offline
Thank you very much! Will you be looking into the relative links too? I am asking because some may think there is no need for them due to the "page in this site" feature but in many cases we publish pages with other methods and do not want to create a place holder page in Sandvox for everything we want to link to within the site. We publish the site to multiple locations (Development, Unit test, Beta test, Production) and need the relative links to work regardless of the target site. -Lee
Offline
OK, as of Sandvox 2.2b17, the Link Inspector will accept fragments, that is: links beginning with a #
I'm still considering relative links.
Offline
Go, Mike, go!
Offline
I would very much like relative links also, for the reasons mentioned in response 7. It seems to me that you could largely solve the problem by just changing things so you don't add "http://" to a link that starts with a period. Changing "../a/b/index.html" into "http://../a/b/index.html" is never an improvement, the former may be legal, the latter never is. This one change would be a big improvement. I just tried 2.2rc1 and see that relative links still aren't handled, at least not in any way I can find.
Offline
I would very much like relative links also, for the reasons mentioned in response 7. It seems to me that you could largely solve the problem by just changing things so you don't add "http://" to a link that starts with a period. Changing "../a/b/index.html" into "http://../a/b/index.html" is never an improvement, the former may be legal, the latter never is. This one change would be a big improvement. I just tried 2.2rc1 and see that relative links still aren't handled, at least not in any way I can find.
The question is why you want to generate links of the form "../a/b/index.html"? Are you trying to link to pages within the site that are outside of Sandvox's control?
Offline
Yes, exactly. My wife created some blogs using iBlog2 which we haven't converted to Sandvox. I published that to my web site in a different folder from the Sandvox generated contents and want to link to the various blogs from the Sandvox content. This seems like a reasonable thing to do.
Offline
My advice then would be to create an External Link page for each blog you want to link to. From the Link Inspector, link to that, rather than directly to the URLs themselves. That allows Sandvox a better idea of where links are pointing to when it generates them. I can't recall if Sandvox is presently clever enough to generate relative URLs from that scenario, but if it isn't, it becomes easy for us to start generating relative links in a future update.
Offline
That doesn't really do what I want. It embeds the external page in the Sandvox site. I want to link to the page. Just a simple link, nothing more.
Just FTR it also doesn't handle relative URLs properly but you can probably fix that easily.
Offline
The external page is listed in the Site Navigator, yes, but nothing special happens to it when publishing. All links to that External Link page are published as links to the real, already-published-elsewhere page.
Offline
Oops, I think I may have gotten confused between an external link "object" and and external link "page". I searched the help for "external" and that's what I found. I won't be able to do anything until next week since this week is consumed by Thanksgiving, but I'll try again then. It sounds like the external link page will do what I want.
Offline
Offline
I wanted to let Mike know that I have been following this closely and agree with the recommendations made. I want to be able to both anchor within my rather long page of information, and could not believe how difficult it was with the upgraded Sandvox. Thanks for paying attention to our input.
Offline
Your responses reminded me that I had never followed through on my promise to look at this more after Thanksgiving. I'm glad to report that in version 2.5.1 using an external link page as suggested in response 15 makes it work the way I want. If an external link page points to another page on the same site Sandvox is smart enough to use a relative link to access that page.
In the process of testing this out I discovered that Sandvox still uses absolute links for a few things. Every page contains both an image_src and a canonical <link> tag with an absolute URL and there are a couple of copyright comments with absolute URLs on each page. This is probably the right thing to do, but it does mean that moving the site around may not work exactly right.
Offline
In the process of testing this out I discovered that Sandvox still uses absolute links for a few things. Every page contains both an image_src and a canonical <link> tag with an absolute URL and there are a couple of copyright comments with absolute URLs on each page. This is probably the right thing to do, but it does mean that moving the site around may not work exactly right.
Yep, the canonical link is absolute by design.
Offline