wysiwyg links and subfolders

7 posts by 2 authors in: Forums > CMS Builder
Last Post: December 12, 2011   (RSS)

By Mikey - December 9, 2011

I've got a few site pages that I'm re-purposing to create additional site pages that are located in sub-folders.

Everything is working fine, expect the links I create using the wysiwyg point back to the root folder site pages and when someone clicks on a link in the content created by the wysiwyg, it kicks them out of the sub-folder and back to the root folder where the main site is located and away from the re-purposed site pages they should be viewing.

Any suggestions on how to fix this so that links created with the wysiwyg keep the site visitor within the folder and sub-folder directories they should be viewing?

Thanks,
Zick

Re: [zick] wysiwyg links and subfolders

By Jason - December 9, 2011

Hi,

You can try using the "Save full URL for local links and images" option in general settings. This should use an absolute path to your page, keeping you in the sub folder.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [zick] wysiwyg links and subfolders

By Jason - December 12, 2011

Hi Zick,

Try putting the name of your folder in front of the page name when creating your link.

For example:
subFolder/page1.php

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] wysiwyg links and subfolders

By Mikey - December 12, 2011

Thanks Jason,
But unfortunately that wouldn't work, because the records are being used on two pages. A page at the root level and a sub-folder page.

The root level page link would need to be as: linktothispage.php
And the sub-folder page link would need to be: sub-folder/linktothispage.php

Site viewers at the root level would need to see root level pages. Site viewers at the sub-folder level would need to remain within the sub-folder directory.

Plus, my client would never remember to add "subfolder" to the link.

Any other suggestions?
Thanks Zick

Re: [zick] wysiwyg links and subfolders

By Jason - December 12, 2011

Hi Zick,

Try this.

Save cmsAdmin/lib/wysiwyg.php as wysiwyg_custom.php (this is so your changes are not overwritten when you upgrade).

Open up that file and look for this line (probably around line 100).

relative_urls : false,

change this to

relative_urls : true,

Save this, and reload your page. Redo your links and save. The "/" at the beginning of your link should be gone.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] wysiwyg links and subfolders

By Mikey - December 12, 2011

Thanks for the help Jason!
That did the trick.
Zick