|
|
Rank: Enthusiast
Joined: 5/20/2008 Posts: 42 Location: Louisville, KY, U.S.A.
|
In the content section in the main Rich Text editor I am having some trouble. I need to create links on the top of a page that jump down the page to anchors. I have created 3 anchors: Adult, Youth and Special Needs. I select the text to apply the anchor link (click the link icon) It opens the link window. I select the anchor name. Click save and test But in the Test umbraco created the link that goes to: http://www.rootURL/#anchor It should base the link from the page url So (in the rich text editor's link dialog box) I tried to add the page link first and then add the anchor. once I add the anchor it replaces the page url with the anchor name. I have tried many combinations of this but it still gives me either just the page and no anchor or the site root and the anchor. Both wrong. What am I doing wrong? Here's the page: http://ourlourdes.org.ourdevsite.com/parish/parish-life.aspx
|
|
 Rank: Fanatic
Joined: 7/19/2006 Posts: 496 Location: Göteborg, Sweden
|
Sharon, have you tried to delete everything before the # ? The browser will add the url of the current page so it isn't actually needed in the href attribute... // ;) Kalle
" - Yeah I'd like to share your point of view, as long as it's my view too... ( http://www.d-a-d.dk/lyrics/pointofview)
|
|
Rank: Enthusiast
Joined: 5/20/2008 Posts: 42 Location: Louisville, KY, U.S.A.
|
Yes, I went in and selected only the anchor pop-up and chose #youth. umbraco put it in the url field - with nothing else there. [#youth]. Looked fine. But when I tested the page it went to the www.ourlourdes.org.ourdevsite.com/#youth - which is wrong. The page is www.ourlourdes.org.ourdevsite.com/parish/parish.aspx.It should have known that. It was its own page! Should I have added the whole URL in the field? maybe I shouldn't even use anchors? I want to. What's going on? What did I do wrong?
|
|
 Rank: Fanatic
Joined: 7/19/2006 Posts: 496 Location: Göteborg, Sweden
|
It's not you, it's the editor that's doing something wrong. Try to see if there's a slash before the anchor. like /#anchor, remove it if possible cause that will make the link root relative. If that doesn't work either, try it with another web browser... // ;) Kalle
" - Yeah I'd like to share your point of view, as long as it's my view too... ( http://www.d-a-d.dk/lyrics/pointofview)
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Just wanted to add that I just used this feature for the first time yesterday. I went through the same steps that Sharon did and it worked fine. So I concur with Kalle that you are doing it right. It must be something wonky with the editor and/or your browser.
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
Rank: Enthusiast
Joined: 5/20/2008 Posts: 42 Location: Louisville, KY, U.S.A.
|
I did as you suggested and it still just goes to the base url with the #anchor at the end. Which is wrong. I deleted the links and tried to create them again. Here is the page: http://ourlourdes.org.ourdevsite.com/parish/parish-life.aspxClick the anchor and see it goes to the wrong place. IN THE EDITOR, There is no slash before the anchor name the url field I chose the anchor name. It placed it in the url field. but it doesn't work. What do I do now? Could my navigation.xslt be messing with it? Does that have anything to do with it at all?
|
|
Rank: Enthusiast
Joined: 5/20/2008 Posts: 42 Location: Louisville, KY, U.S.A.
|
Also weird is the content picker. When I used it in one of my doctypes and templates it gives me the wrong URL !!! I have replaced it with a textstring and the user has to figure out the page url and type it in just to get it to work. BAD :( Could this be related? Here is the navigation sitemap type xslt code for review: Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<!-- update this variable on how deep your site map should be --> <xsl:variable name="maxLevelForSitemap" select="4"/>
<xsl:template match="/"> <div id="nav"> <xsl:call-template name="drawNodes"> <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::node [@level=1]"/> </xsl:call-template> </div> </xsl:template>
<xsl:template name="drawNodes"> <xsl:param name="parent"/> <xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)"> <ul><xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap]"> <li> <xsl:choose> <xsl:when test="@nodeTypeAlias='RedirecttoMedia'"> <xsl:variable name="media" select="data [@alias='myMedia']" /> <a href="{umbraco.library:GetMedia($media, 0)/data[@alias='umbracoFile']}"> <xsl:value-of select="@nodeName"/> </a> </xsl:when> <xsl:otherwise> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </xsl:otherwise> </xsl:choose>
<xsl:if test="count(./node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap]) > 0"> <span class="arrowspan"><img src="/media/1105/arrow.gif" class="arrow" /></span> <xsl:call-template name="drawNodes"> <xsl:with-param name="parent" select="."/> </xsl:call-template> </xsl:if>
</li> </xsl:for-each> </ul> </xsl:if> </xsl:template>
</xsl:stylesheet>
|
|
Rank: Enthusiast
Joined: 5/20/2008 Posts: 42 Location: Louisville, KY, U.S.A.
|
Hey!
Whoo Hooo!
My rank has changed!
I am an Enthusiast now!
How'd that happen! Great!
|
|
Rank: Enthusiast
Joined: 5/20/2008 Posts: 42 Location: Louisville, KY, U.S.A.
|
just so you know. I am new to xslt and did not write this code. I must give credit to Doug Robar for writing the basic xslt to help me direct pull down menu items to pdf files and media files in addition to pages.
But then I "adjusted" with the code to add an arrow in the menus.
I may have caused the URL problems.
That is--if it is related and would cause the issue I am having
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 815 Location: Århus, Denmark
|
I have seen the weird anchor behaviour as well on sites that has a Hostname attached to the topnode, and uses the "useDomainPrefixes" option in the umbracoSettings.config I have no solution to it, but just wanted to say that I think it is a bug, and not related to browser versions.
|
|
Rank: Enthusiast
Joined: 5/20/2008 Posts: 42 Location: Louisville, KY, U.S.A.
|
I don't understand what you mean by Hostname attached to the topnode or useDomainPrefixes. Can this be changed on the host level? Or is it done as done sort of thing.
This sounds like server talk.
Anyone have a solution?
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 815 Location: Århus, Denmark
|
If you right click on your top node, you can choose "Manage Hostnames". There you can attach hostnames to a certain node, making it possible to use one umbraco install for multiple websites. The "useDomainPrefixes" is an option that can be set in config/umbracoSettings.config file. This forces umbraco to put domain names on links to be sure to get the right domain when visiting a page.
|
|
 Rank: Devotee
Joined: 7/6/2007 Posts: 69 Location: Brussels
|
I am writing a special output for a email newsletter an I have the same problem in Umb 305
I have multiple websites in one umbraco but still uses: <useDomainPrefixes>false</useDomainPrefixes>
in my xslt: <a href="#art{@sortOrder}"> it will become in the output: <a href="http://<domain>/#art{@sortOrder}">
On the other hand images added from the media section (added via rechtext tiny) in the content do not have the domain attached, and here I actually need them!
Someone?
Cheers,
^(B(astia{2}n)?)(\s)?(W(ak{2}ie)?)$ IRC --> irc://irc.freenode.org/umbraco
|
|
Rank: Aficionado
Joined: 6/25/2007 Posts: 146 Location: Malmo, Sweden
|
Regarding the anchor link problem, I think it is the same strange behaivour that we experienced on one of our sites a year ago or so? I wrote an quick and ugly hack to fix it using client side javascript. See here: http://forum.umbraco.org/yaf_postst1446_anchors.aspxBut there probably is a better way to solve it.
Is it me or umbraco? Umbraco Certified Professional Level 2.
|
|
Rank: Newbie
Joined: 9/5/2008 Posts: 9 Location: Chattanooga, TN
|
I'm having the same issue.
Here's another ugly workaround to get past the bug. It's basically the first thing Sharon tried but typing in the anchor name after the page tag instead of clicking the drop down again.
Choose whatever page in the Content Tab. (It'll put something like {localLink:1087} in the Link Url Field)
Click in the Link URL field right after {localLink:1087} and type #Anchor Name but change 'Anchor Name' to whatever you named your anchor.
EG: {localLink:1087}#Anchor Name
|
|
Rank: Newbie
Joined: 10/27/2008 Posts: 1
|
jonhoye wrote:I'm having the same issue.
Here's another ugly workaround to get past the bug. It's basically the first thing Sharon tried but typing in the anchor name after the page tag instead of clicking the drop down again.
Choose whatever page in the Content Tab. (It'll put something like {localLink:1087} in the Link Url Field)
Click in the Link URL field right after {localLink:1087} and type #Anchor Name but change 'Anchor Name' to whatever you named your anchor.
EG: {localLink:1087}#Anchor Name
I've attempted this workaround and found it fine - until I noticed something. As soon as I select the HTML edit button in the RTE - the editor window pops up - and every { or } is changed for %7B or somesuch. Which means the link no longer works. Any way of stopping the editor 'amending' the elements it has inserted itself? Any ideas?
|
|
Rank: Enthusiast
Joined: 5/20/2008 Posts: 42 Location: Louisville, KY, U.S.A.
|
putting the actual page name and # anchor works fine.(/mypagename.aspx#anchorname)
Maybe this will be fixed in version 4 of umbraco.
|
|
|
Guest |