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

Trying to use CMSB as a extension of a monthly newsletter. This will be setup much like Interactive tools Newsletter with links to a tagged area within the page. I need to be able to use anchor tags for a table of contents which links to the area of content on the page.

I could use some advice on the best way to accomplish this.

Re: [Ginslinger] Using anchor tags within content

Hi Ginslinger,

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
The first CMS Builder reference book is now available on-line!







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

Hi Ginslinger,

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.
All the best,
Chris

Re: [chris] Using anchor tags within content

I have tried to use the anchor tag within the editor but could not get it to function correctly. Creating a table of contents within the page is what I would like to accomplish. Couldn't find any documentation on using the anchor tag. Is there something I could be missing?

Re: [Ginslinger] Using anchor tags within content

Going to the Tiny Mice site and using there example page you can insert an anchor link as it has an added spot to choose what anchor to use for the link. How do you add these type of fields to the editor. I tried finding the needed information on there site but don't have hours to find the answer to this.

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: [Dave] Using anchor tags within content

Hi Dave and thanks for the reply. I understand that we cannot generate a table of contents automatically. My question is how do we generate the anchors in the editor so that they can just be selected rather than entering them manually. I have included image that shows how it is demonstrated on TinyMice site.

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.
Attachments:

anchors.jpg 40K

Re: [Ginslinger] Using anchor tags within content

By Dave - October 26, 2009

Hi Ginslinger,

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.
Dave Edis - Senior Developer
interactivetools.com
Attachments:

advlink.zip 16K

Re: [Dave] Using anchor tags within content

Thanks Dave. Very much appreciated.

Re: [Dave] Using anchor tags within content

Hi Dave,
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