Anchor links in tabbed content with cms_selflink

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
cpansewicz
Forum Members
Forum Members
Posts: 142
Joined: Fri Jun 17, 2011 12:22 am

Anchor links in tabbed content with cms_selflink

Post by cpansewicz »

Hi,

Is it possible to set-up an internal anchor links on a page to tabbed content on another page using csm_selflink? (or at all for that matter?)

I was told this is not possible, but thought I would ask for a second opinion.

Thank you!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Anchor links in tabbed content with cms_selflink

Post by velden »

Do you mean some automated way or just manual?
cpansewicz
Forum Members
Forum Members
Posts: 142
Joined: Fri Jun 17, 2011 12:22 am

Re: Anchor links in tabbed content with cms_selflink

Post by cpansewicz »

Manually is fine with me. I don't have that many instances of this.

If there is an automated way it would be interesting to know that out of curiosity.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Anchor links in tabbed content with cms_selflink

Post by velden »

Maybe I'm thinking too simple:

(CMSMS 1.12.1)

Code: Select all

{cms_selflink page="shadowmenu-tab-2-columns" dir=anchor anchorlink="anchor-test"}
cpansewicz
Forum Members
Forum Members
Posts: 142
Joined: Fri Jun 17, 2011 12:22 am

Re: Anchor links in tabbed content with cms_selflink

Post by cpansewicz »

Thank you. I do have them set up that way currently. The anchorlink will go to the correct page, but doesn't go to the location on the correct tab.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Anchor links in tabbed content with cms_selflink

Post by calguy1000 »

You will need javascript to set that up. There is no 'standard' way of doing that.

On load you will need to test if there is a hash in the document.location
if there is:
- find that link
- find the parent tab of the link
- make the tab visible
- hide the other tabs
- scroll to the link
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
cpansewicz
Forum Members
Forum Members
Posts: 142
Joined: Fri Jun 17, 2011 12:22 am

Re: Anchor links in tabbed content with cms_selflink

Post by cpansewicz »

Ok. Thanks.
Post Reply

Return to “Modules/Add-Ons”