problem with external link

Permalink
if you want a link that is not a page - linking to a page on your own site - you might use external link right?

my problem i need the linked to page to be a child under the external link page. so i drop the link to page onto the external link but when you visit the child page the url in the address includes the fullhttp://mysite.com/httpmysite-comlinktopage...

messy its looks like the child page gets its url not from the name field of the external link but from the http of the external link.

i need it to be a child of the external link so that when you are on the child page the parent page can be highlighted as well using nav path selected.

ecomatt
 
foster replied on at Permalink Reply
foster
Did you ever come up with a fix for this?

-Foster
jordanlev replied on at Permalink Reply
jordanlev
Instead of creating an external link, you could use the free "Page Redirect Attribute" addon from the marketplace, and make a normal page in your site map for the external page - but assign that attribute to it so it redirects elsewhere. Then the child page paths would be more how you're wanting them to be.
foster replied on at Permalink Reply 2 Attachments
foster
Well... Here's what I'm trying to do. Maybe you will know of a better way....

On the "work" page, I have a page list that is using the animated filter add-on made by dojo, but I wanted to have the urls update when the list is filtered. I have successfully integrated jQuery BBQ with Isotope (the filtering js used by dojo). So that's going great.
BTW, I am using your Manual Nav as part of the build - thanks for that block!

Where I am stuck is that I want the submenu to link back to the filtered list on the Work page... so if I click on Branding I need the url to behttp://site.com/work/#filter=.Branding... so that the Work page loads, but then the Branding items are filtered...

I came up with the idea of using an External Link to accomplish this... So I put the project pages underneath the External Link called Branding and everything works great... except that the url for the project pages looks something like:http://site.com/work/http.site.comworkfilter.branding/projectname/...

Using the External link is great because I can use .nav-path-selected to style the menu to indicate where you are in the site...

See attached for images of site map and the submenu (I have only tried the External Link solution for "Branding").

So everything is functioning correctly, but I would prefer if the url was a little prettier.
I have tried using .htaccess, but just haven't got it working, although I suspect that is the way to go.

Any thoughts?
jordanlev replied on at Permalink Reply
jordanlev
I see... because you have ajax functionality you don't actually want a redirect to occur.
Not sure this is something I can solve for you here in the forums, probably will require some clever programming...
You might also want to think about using javascript to rewrite the links of those sidebar things. Maybe make a normal page (not an external link) for the top-level category pages, so you get the url structure you desire, then rewrite the links of the sub-pages so they trigger the proper ajax link instead of actually linking to a page?

I don't think there's a built-in concrete5 way to do it though (as far as I can tell from what you've provided).
foster replied on at Permalink Reply
foster
I was hoping that you might say something like, "Oh, that's so easy, just do _____".
Oh well, I'll keep at it and report back if I come up with a good solution. Using the External Link works... but it's just such a horribly long url.

Thanks for the responses!

-Foster
foster replied on at Permalink Reply
foster
Ah - should have mentioned about the redirect... I might have been doing it wrong, but when I redirect the "Branding" page to the filtered work page ( ....work#filter=.Branding), the link to the Project Page under the Branding page is redirected as well.

Any tips for htaccess redirect or rewrite are much appreciated, plus any thing I might not have thought of at all.

-Foster
foster replied on at Permalink Best Answer Reply
foster
Using information from this thread (second reply):http://www.concrete5.org/community/forums/customizing_c5/external-l...
I was able to access the properties window and change the Canonical URL for the external link.

It works so great!

Thank you for the responses - and a big shout out to hursey013 for posting this super secret trick, which I will quote here:
"I didn't think it'd actually work, but I just used Firebug and manually changed the cID in the "Properties" link of another page to the cID of my external link. This allowed me to bring up the Properties window for the external link and I was able to add in a description that way... who knew."
jordanlev replied on at Permalink Reply
jordanlev
Wow, that's stunning. I marked your own answer as "best" (because it is).

And you might want to submit a "bug report" for it and link to that forum thread -- just to get it on the core team's radar (I know it's not a bug but that seems to be the best place to communicate "feature requests" to them).

This is great to know for future reference, thanks for following up.
mkly replied on at Permalink Reply
mkly
You can use "Page Search" instead of "Sitemap" to can get to all the properties.

You can even set permissions to hide a link.

I'm not sure if that was intended or just a side effect of the new page search.

I had no idea until someone I was working with told me about it.
foster replied on at Permalink Reply
foster
Even better! Thanks for the knowledge.

-Foster
pds replied on at Permalink Reply
This might have some unintended consequences. A client I work with figured this out. The super-admin account and client accounts simultaneously became unable to delete external links using the sitemap context menu.

I've got a thread with screenshots here:

http://www.concrete5.org/community/forums/customizing_c5/whats-up-w...
egnexas replied on at Permalink Reply
egnexas
For me foster's answer somewhat helped, but I couldn't change the url if it really was an external link.
I found the problem in the page list block's view file. It handles all links the same (when external links should be a bit different). A fix I made to the view file, change:
$url = $nh->getLinkToCollection($page);

To:
if ($page->getCollectionPointerExternalLink()) {
    $url = $page->getCollectionPointerExternalLink();
} else {
    $url = $nh->getLinkToCollection($page);
}