How to link custom pages without hardcoding them

Hello All,

I created a few pages only visible to guests.
On one of the pages I need to insert some links to point to other pages.
I could not find any way to do this without hardcoding these links.
Is there a convention to use in custom html pages to represent global variables such as $site['url']?

Should I use php codes directly in my html in order to get this achieved?

I'm developing at localhost and worrying about the future transfer to production server.

In advance thanks for any hints or tips.
-Charles

Quote · 13 Mar 2012

Hello Charles

Do you use admin panel -> Builders -> Pages Blocks to create the pages and standard HTML blocks to add content on the page? If so, you are using standard HTML Editor which converts absolute internal URLs to relative URLs. For example, if you are adding a link http://dolphin/member.php using "Insert/Edit Link" button the Editor should save it and display later as /member.php

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
Quote · 14 Mar 2012

Hello AntonLV,

First thank you for your answer.

Hello Charles

Do you use admin panel -> Builders -> Pages Blocks to create the pages and standard HTML blocks to add content on the page?

Yes I'm using the Pages Blocks builder.

If so, you are using standard HTML Editor which converts absolute internal URLs to relative URLs. For example, if you are adding a link http://dolphin/member.php using "Insert/Edit Link" button the Editor should save it and display later as /member.php

Using the standard HTML Editor but not in Graphic mode; I'm editing directly with the HTML Source Editor.
The case I can't understand is as follow:
$site['url'] = "http://localhost/dolphin_1.com/"
$dir['root'] = "/srv/www/htdocs/dolphin_1.com/";
The editor is accepting href="/page/mypage1". But Viewing the page, the link points to http://localhost/page/mypage1
Inserted href="page/mypage1" is transformed by the editor to href="/dolphin_1/administration/page/mypage1"
This makes it impossible to insert an url in the HTML Editor pointing to the correct url which should be http://localhost/dolphin_1.com/page/mypage1 without hardcoding it.

That's why I'm suspecting that there is probably a convention I'm missing.

Is this the case?
I tested and I realized that the editor does not support php tags.
But how to create pages with the "Pages Blocks Builder" and link them each other using relative urls while developping at localhost?

Thank you for your time.
Best Regards.
-Charles

Quote · 14 Mar 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.