Named Objects and linking to them
I'm having two issues with linking to named objects.
1) I have a button that links to a named object. I updated the Web Properties on the button to make the link. I selected Link to Anchor and picked the Named Object. So I believe that is all good. I then shared the object with all variants. When I hover over the object in a variant, the popup message shows Link to Anchor: and the right object. However when I look at the Web properties / Link the Link to Anchor button is pushed but the dropdown box is empty - it doesn't show the object. If I click on the dropdown box, none of my named objects are there. If I preview the website, the button on the variant just takes me back to the top of the current page and not to the named object on the other variant web page.
2) If I preview the website on the main (not variant) page and click on the button, I'm take to the proper page but not to the proper position on the page. The named object I'm linking to is off the bottom of the screen and I need to scroll to I. I thought the link was supposed to scroll the object into view.
Thanks
Re: Named Objects and linking to them
Hi Donald,
Without seeing your web/xar file I couldn't say exactly what's going on but ensure that the named anchors are on both variants and that they are on the page, not the pasteboard.
If you still have issues attach your web/xar file.
Re: Named Objects and linking to them
Quote:
Originally Posted by
Egg Bramhill
Hi Donald,
Without seeing your web/xar file I couldn't say exactly what's going on but ensure that the named anchors are on both variants and that they are on the page, not the pasteboard.
If you still have issues attach your web/xar file.
Egg, I don't think it is as simple as that. HTML and javascript work to the first mention of an identifier. If you have three Variants and you have three mentions of the same ID then only the first one is recognised. If it happens to be in a hidden div, all that happens is the page jumps to the top.
Acorn
1 Attachment(s)
Re: Named Objects and linking to them
Not sure about that Acorn. Attached is a web page with two variants. I've reversed the relative positions of the two anchors in the mobile variant and it still works as expected in preview.
Re: Named Objects and linking to them
Egg, thank you for the example.
Xara accepts the Name of egg for the Main variant and then mangles it into Xxr_v2_egg for the variant.
This is a good thing as it overcomes my mistaken belief that it was not being handled.
I have followed Donald's instructions as to how he has created his anchors and links and I cannot duplicate the problem.
We need your design file.
I have learned my lesson in spouting out without checking; I was away for the day.
I have just checked across Variants, pages and Supersites of all types and everything works as you would expect.
Acorn
Re: Named Objects and linking to them
Ah, I got something right :-O Thanks for the clarification Acorn.
Re: Named Objects and linking to them
Going to named anchors seems to work just fine when the anchor is on the same page. However, if the named anchor is on another page, the page is loaded but not scrolled down to show the anchor.
Re: Named Objects and linking to them
Can you attach a web file showing this behavior Donald. It works fine for me.
Re: Named Objects and linking to them
Unfortunately I can't share the file. Its for an Intranet website that contains some propriety information. I'll try to clean it up and see if I can upload it. But thanks for the quick reply!
1 Attachment(s)
Re: Named Objects and linking to them
Here is a file that I can share. It's a template that I'm using from XaraTemplates.com.
Click on the button "Goto Hike Anchor on Training Page". On the training page there is a picture of a hiker towards the bottom of the page. On the [Main] variant, I added the name "Hike". This picture is shared with all variants, but the name does not appear on the [Wide] and [Mobile] variants. When I preview any of the variants and click on the Goto Hike button, they all take me to the right Training page but do not scroll down to the picture.
Re: Named Objects and linking to them
Quote:
Originally Posted by
donaldsa
Here is a file that I can share. It's a template that I'm using from XaraTemplates.com.
Click on the button "Goto Hike Anchor on Training Page". On the training page there is a picture of a hiker towards the bottom of the page. On the [Main] variant, I added the name "Hike". This picture is shared with all variants, but the name does not appear on the [Wide] and [Mobile] variants. When I preview any of the variants and click on the Goto Hike button, they all take me to the right Training page but do not scroll down to the picture.
In Main, you have applied the Name Hike to the embedded group containing the photo. Xara complains to me that all this is "too complicated". Personally, I would delete the embedded group. Re-add the image and put the Anchor to it. You would have to repel text to complete the task.
Failing this remove the Anchor Hike from the group.
Create a small inconspicuous box near the top of the picture and add Anchor Hike to that and repeat across variants.
I avoid the Xara-designed templates and build my own as any mistake are mine and not a Xara profession template designer's.
Acorn
1 Attachment(s)
Re: Named Objects and linking to them
Hi Donald,
There is only one named object Hike on the main variant and I believe this may well be the cause, I think you need a named link on all variants. Having said this though I still couldn't get it to work.
I prefer not to use text or images within the cntent as anchors but choose to use anchor shapes (they will eventually be converted to images anyway) just on the page borders. This is particularly useful if you are using stick to top menus otherwise they link to an anchor below the top of the menu.
I attach a (hopefully) working copy ;)
Re: Named Objects and linking to them
Quote:
Originally Posted by
Egg Bramhill
I prefer not to use text or images within the cntent as anchors but choose to use anchor shapes (they will eventually be converted to images anyway) just on the page borders. This is particularly useful if you are using stick to top menus otherwise they link to an anchor below the top of the menu.
Donald, more or less the same approach from us both.
Acorn
Re: Named Objects and linking to them
Thanks everyone, that seemed to do the trick. i'm using templates as a way to learn some of the tricks. :)
Re: Named Objects and linking to them
So I'm still struggling with this. The example you posted seems to work just fine. But when I do the same thing in my website its still not working.
1) I create a rectangle object on my home page.
2) I right click and goto Web Properties. I select Link to Anchor and pick the anchor name.
3) Within Xara, if I click on the object it shows "Link to Anchor: hike-2, change, remove" and if I click on the hike-2 link it takes me to the proper page and place.
3) However, if I preview the website and hover over the new rectangle I just created, the web url that shows up is index.htm# instead of training.htm#hike-2. Is there some setting on the rectangle object that I'm missing???
Re: Named Objects and linking to them
Can you send your web file again Donald?