Using anchor tags within content
15 posts by 6 authors in: Forums > CMS Builder
Last Post: September 16, 2011 (RSS)
By Ginslinger - October 21, 2009 - edited: October 21, 2009
I could use some advice on the best way to accomplish this.
Re: [Ginslinger] Using anchor tags within content
just a thought, you could use a field in your section editor for the anchor tag, with a "must be unique restriction" and then insert that field in both the "a href" and the "a name" link elements in your viewer.
Hope that gets you started.
Best,
Jerry Kornbluth
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] Using anchor tags within content
By Chris - October 21, 2009
The WYSIWYG editor has an "Insert/edit Anchor" button (it looks like a ship's anchor.) You could generate a Table of Contents using some custom PHP code, or just manually create it each time.
I hope this helps. Please let me know if you have any questions.
Chris
Re: [chris] Using anchor tags within content
Re: [Ginslinger] Using anchor tags within content
What good is having a function in the editor if it doesn't work? There may be documentation but I sure can't find it.
Re: [Ginslinger] Using anchor tags within content
By Dave - October 26, 2009
You can add an anchor tag as follows:
1) Select the place you want to create an anchor.
2) Click the wysiwyg button with a picture of an anchor
3) Enter an anchor name (eg: test)
You can link to the anchor like this:
1) Select some text you want to link
2) Click the chain link button in the wysiwyg
3) Beside "Link Url" enter # followed by the name of your link (eg: #test)
That's how you enter anchor links. There's no way I know of to automatically generate the table of contents content, though. We do ours manually.
Hope that helps!
interactivetools.com
Re: [Dave] Using anchor tags within content
I spent sometime trying to find documentation on how to add these fields to the editor with no luck. I did finally get them to work manually though.
Thanks for the help.
Re: [Ginslinger] Using anchor tags within content
By Dave - October 26, 2009
Thanks for the image. It looks like that is using the advlink plugin for tinymce. That's not one we support or ship with CMS Builder, but it is possible to setup with a little work.
1) I've attached a file called advlink.zip. Unzip that and upload the folders to here on your site:
/cmsAdmin/3rdParty/tiny_mce/plugins/advlink
2) Edit /cmsAdmin/lib/wysiwyg.php
3) Search for "plugins:" and edit these two lines and add the code in red:
Around line 18:
plugins: 'safari,inlinepopups,contextmenu,table,fullscreen,paste,media,spellchecker,advlink',
Around line 53:
plugins: "safari,inlinepopups,contextmenu,table,fullscreen,paste,media,spellchecker,advlink",
Then reload the page in your CMS and see if it works.
Note that we don't use those advanced tinymce plugins, but there's some docs for them here: http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink and hopefully my instructions will point you in the right direction.
Hope that helps.
interactivetools.com
Re: [Dave] Using anchor tags within content
Re: [Dave] Using anchor tags within content
Would this still apply for version 2.07 of cms builder? I'm trying to do the same thing but those instructions haven't changed the image dialogue in tinyMCE for me. I tried it with what I thought was a newer version of the plugin, but still no joy.
Ian