wysiwyg links and subfolders
7 posts by 2 authors in: Forums > CMS Builder
Last Post: December 12, 2011 (RSS)
By Mikey - December 9, 2011
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
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: [Jason] wysiwyg links and subfolders
By Mikey - 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
Hey Jason,
I tried that, but it sets the full URL to the http root level and the page I'm working with is located within a sub-folder that along with this page are the other re-purposed site pages, that I'd like links created in the wysiwyg to go to.
So in any link created with the wysiwyg is free of the full URL http://your-domain.com/this-site-page.php and looks only for the this-site-page.php page. This way the page links created in the wysiwyg always look within the directory they are located in... and not at the html root level of the site.
Hope that makes sense.
Zick
Re: [zick] wysiwyg links and subfolders
By Jason - December 12, 2011
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
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
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
That did the trick.
Zick