FRMK
Posts: 38
|
| Posted: 02/26/2013, 12:24 AM |
|
When I attach pages inside my project to menu items, all is fine. If I try to assign an absolute url outside the project
i.e. http://www.externalsite.net
I fail.
It resolves to
//localhost/projectname/http://www.maryknoll.net.
Can you tell me how to specify that Url as a static menu item? Thank you.
_________________
FR |
 |
 |
DataDoIT
|
| Posted: 02/26/2013, 10:57 AM |
|
When posting to the 'other' newsgroup, you should specify your
environment. Assuming PHP:
First, go into the HTML, select the menu link, and change it's
visibility from 'Yes' to 'Dynamic'. That will make it an object we can
work with.
Then, in the menu's Before Show Row event add code:
if (CCSubStr($Container->Menu1->ItemLink->GetLink(), 0, 4) == "http") {
$Container->Menu1->ItemLink->SetLink($Container->Menu1->ItemLink->GetLink());
}
else {
$Container->Menu1->ItemLink->SetLink(ServerURL .
$Container->Menu1->ItemLink->GetLink());
}
|
|
|
 |
FRMK
Posts: 38
|
| Posted: 02/26/2013, 11:05 AM |
|
Thank you.
Yikes. I need to write code just to assign a Url when it is outside the project?
I guess I better go repeat this question in the ASP.NET section, as that is what we use.
Thank you again.
_________________
FR |
 |
 |
FRMK
Posts: 38
|
| Posted: 02/26/2013, 12:37 PM |
|
Support stated:
Quote :Please set the Convert URL To Absolute option of the ItemLink.
I don't see any such option when setting up a Static menu option. I'd post a screenshot if there was a way to do so.
_________________
FR |
 |
 |
laneoc
Posts: 154
|
| Posted: 02/26/2013, 1:35 PM |
|
One of the properties a link component is "Convert URL to". It's just below Href Source and just above Remove Parameters.
_________________
Lane |
 |
 |
DataDoIT
|
| Posted: 02/26/2013, 4:54 PM |
|
Convert URL to Absolute may open up other unwanted issues. I like to
maintain granular control of those links.
|
|
|
 |
FRMK
Posts: 38
|
| Posted: 02/27/2013, 9:13 AM |
|
I now see the option, but - it Still doesn't work. Still mangles the URL I provide.
_________________
FR |
 |
 |