CodeIgniter Forums
Cross linking in sub classes - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Cross linking in sub classes (/showthread.php?tid=10020)



Cross linking in sub classes - El Forum - 07-16-2008

[eluser]bigdaddysheikh[/eluser]
Hey guys,

I am trying to find an efficient way of linking between sub controllers/functions that are within files.

I have learned that I cannot just put "../admin/foo" because once in the foo page, a different link setup needs to exist "admin/foo". I could be wrong in the directory setup but the concept is the same: having different link patterns.

Now I do want to put base urls because, my co-worker told me that new http urls will keep refreshing the browser and will not cache the site as it would if links were /admin/foo" etc..

This is something I want to do with one generic type link because of different design templates in different folder.

I know this is a long shot and I am assuming there could be no fix. But just want to know if others have run into same issues.

Thanks.


Cross linking in sub classes - El Forum - 07-16-2008

[eluser]thinkigniter[/eluser]
Hi bigdaddysheikh,

If I understand you correctly this may help.

I have my css, js, images in the root of my CI folder eg.

with \system\application\MY_APP as my path

I would have...
\system\assets\js\my.js
\system\assets\css\my.css
\system\assets\images\my.jpg

In my views I have link my assets via...
\asset\js\my.js
etc.

This works well for me because I'm not giving away my REAL path in my link.

There for improving my site security.


Cross linking in sub classes - El Forum - 07-16-2008

[eluser]wiredesignz[/eluser]
Anywhere a browser can access on your server is unsecure. Allowing the browser into the system directory is not recommended.