Force pages to be only available as a child?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
pspmikek

Force pages to be only available as a child?

Post by pspmikek »

Is there any way to make a page only available as a child?

For instance, I want a page bar to be available as:

http://www.example.com/foo/bar/

but NOT

http://www.example.com/bar

thanks
Pierre M.

Re: Force pages to be only available as a child?

Post by Pierre M. »

I vote for this feature. I want a fair URL-content matching.

If the same content is duplicated under multiple URLs, the pagerank could be affected : crawlers could see this as bot spamming.

PM
mahjong

Re: Force pages to be only available as a child?

Post by mahjong »

In config.php, set use_hierarchy to false

Code: Select all

$config['use_hierarchy'] = false;
Pierre M.

Re: Force pages to be only available as a child?

Post by Pierre M. »

@mahjong : thx for your answer. You mean "true" ?-)
PM
Pierre M.

Re: Force pages to be only available as a child?

Post by Pierre M. »

Hey, pspmikek is right, there is a problem :

With use_hierarchy set to true, a child is available as a child AND directly, which is a BUG regarding my indexing comment.
With use_hierarchy set to false, well, I don't have the hierachy I want. As pspmikek says, I want /hierarchy/of/my/page.html and no /page.html

PM
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Force pages to be only available as a child?

Post by Dr.CSS »

I don't think you are being clear as to what you want...

just my 0.02 $

as i'm not sure what you are trying to do...
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Force pages to be only available as a child?

Post by tsw »

I dont think its possible atm, please file a feature request and well take a look after 1.0 is out
pspmikek

Re: Force pages to be only available as a child?

Post by pspmikek »

mark wrote: I don't think you are being clear as to what you want...

just my 0.02 $

as i'm not sure what you are trying to do...
I'll file a feature request, but to clarify:

If I create a parent page foo and then a child page bar:

http://example.com/foo/bar

should go the page.

http://example.com/bar should not.

And I should be able to create another bar page as a child of a different page

http://example.com/abc/bar

Having unique page names gets a little awkward. For instance:

http://www.example.com/media/calendar
http://www.example.com/youth/calendar

Today, I have to do:

http://www.example.com/media/m_calendar
http://www.example.com/youth/y_calendar

Mike Kaply
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Force pages to be only available as a child?

Post by Dr.CSS »

The...
http://example.com/bar  should be made to happen in the config.php I believe it has to do with the parent/child pages setting.
  this ? 
#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = false; false should just show the page... http://example.com/bar 

The...
Having unique page names gets a little awkward. For instance: you can give them a unique alias and they can have the same name
mahjong

Re: Force pages to be only available as a child?

Post by mahjong »

The way CMSMS is designed, page alias must be unique. It's required for all tags to work, especially {cms_selflink}

In my own opinion, you are focusing a detail that has absolutely no importance for users. Users don't guess page names and type them in. They simply follow links you provide for them. As for the esthetics of URL, nobody really cares if the page is named ycalendar or calendar-y or whatever. The only thing you need to acheive is to hide URL parameters from search engine robots since they tend to have difficulties making sense of the site's hierarchy when provided with strings like /?page=calendar&sect=youth&userid=537645 It's a lot easier for them to digest /youth/calendar-y.html?userid=537645
Last edited by mahjong on Thu Sep 07, 2006 3:16 pm, edited 1 time in total.
Pierre M.

Re: Force pages to be only available as a child?

Post by Pierre M. »

mahjong wrote: The way CMSMS is designed, page alias must be unique. It's required for all tags to work, especially {cms_selflink}
Well, if it is the only problem, then the alias should be the entire hierarchical alias (the URL), not just the leaf. "/a/b/c/d" rather than "d". That way, page aliases would remain unique. After all, URL are unique, hehe.
In my own opinion, you are focusing a detail that has absolutely no importance for users. Users don't guess page names and type them in. They simply follow links you provide for them. As for the esthetics of URL, nobody really cares if the page is named ycalendar or calendar-y or whatever. The only thing you need to acheive is to hide URL parameters from search engine robots since they tend to have difficulties making sense of the site's hierarchy when provided with strings like /?page=calendar&sect=youth&userid=537645 It's a lot easier for them to digest /youth/calendar-y.html?userid=537645
I beg to differ, I CARE about pretty URLs. Here are some reasons why :
-prettiness doesn't hurt me. Beauty doesn't hurt me.
-I'd rather have "/apple/steve" than "/apple-w/steve-v" for content about Steve@Apple.
-pretty URLs are OK for users who "simply follow links you provide for them". NOBODY would complain.
-well designing a web (content) service requires nice URL planning. This is HTTP. Ugly hacks are not needed for a better world.
-every webmaster cares the pagerank. As you said, bots give the URL "/howto/repair/car" a better mark than "/?page=howto-repair-car&a=b&c=d&etc".

And I'm confident that cms_selflink will work well.

PM
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Force pages to be only available as a child?

Post by calguy1000 »

I disagree with the concept of heirarchical aliases.  the purpose of an alias is to use it as a quick way of accessing a page... so you don't have to remember the full heirarchy to it when creating internal links or adding modules, etc.  and maybe even for the user.

So I want to be able to use http://www.mysite.com/pagealiasname to go directly to the page independant of the heirarchy.  I can alsu use pagealiasname in cms_selflink, without having to worry about the heirarchy, this lets me move the pages around and re-order them without having to go back and clean up all of my links, etc.

However, we should also be able to go to http://www.mysite.com/apple/stevejobs  and also http://www.mysite.com/disney/stevejobs and it should bring up two separate pages, as we are using some other type of naming.

Aliases weren't ment for this IMHO, we need something else.  Up till now we've been shoe-horning aliases into this slot, and although for alot of people it works just fine, there are drawbacks.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
mahjong

Re: Force pages to be only available as a child?

Post by mahjong »

Beauty is in the eye of the beholder. For bots, Steve, steve-v, sdgfyd.html and s25535.html are equally "pretty".

And, nothing forbids you to write your own Rewrite rule to map /a/b/c/pretty.html to /index.php?page=a_b_c_pretty

For the vast majority of users, it's a lot easier to toggle pretty URLs without worring about the hierarchy.
Pierre M.

Re: Force pages to be only available as a child?

Post by Pierre M. »

Good posts, thank you calguy1000 and mahjong.

@calguy1000 : you are right, aliases should be aliases, sort of "shorcuts". I was messing them with URLs.
So what I wanted to say is rather : the cms should allow to build a nice site structure (with pretty hierarchichal URLs as in your disneyapple example) and should allow aliases as shortcuts (may be by http 302 server side redirecting).

And may be these shortcuts should be managed separately from the hierarchized content, to be anything pointing to any content : this would allow to migrate a static site by redirecting its existing URLs. (I hope I don't mess things again ;)

@mahjong : yes, "Beauty is in the eye of the beholder". I agree on this.
For bots, Steve, steve-v, sdgfyd.html and s25535.html are equally "pretty".
Of course it depends of the bots we consider. But I've read that Google is very URL sensitive ; for it, "steve" gets a better rank than "sdgfyd" and "s25535" if searching for "steve". On
http://www.google.com/support/webmaster ... swer=35769
I read "Don't use "&id=" as a parameter in your URLs, as we don't include these pages in our index" and other URL related things.
nothing forbids you to write your own Rewrite rule to map /a/b/c/pretty.html to /index.php?page=a_b_c_pretty
This is right. Even better : CMSms already allows its users to automatically have /a/b/c/pretty rather than /index.php?page=a_b_c_pretty and I lke it. And I use it. But as pspmikek has found and calguy1000 has agreed ("although for alot of people it works just fine, there are drawbacks") it could be better : allowing the nice current stuff *and* the "shorcuts" redirects I tried to explain above.

My proposal is simple minded : let current aliases be called URLs (hierarchy included) and let a "shortcut-redirector-mapper" be.
I'm sorry if my wording is confused, English is not my native language.

PM
Locked

Return to “CMSMS Core”