SEO Friendly Blog Titles (link) |
[eluser]IamPrototype[/eluser]
What I wanted to do was that everytime I enter a entry, the META title would be edited to something like "<entry_name> | Domain.net".. the problem is that I "include" my top.php in the controller (loading the view).. so how can I make it that the entry title pops up in the top.php? And if I go to another page like "About me" it changes to "About Me | Domain.net". I know I just can enter the segment code in the META title, but that would cause a huge code, or what? An example could be the CI Forum, the META title.
[eluser]John_Betong[/eluser]
Hi alectrash, Am I missing the point or not seeing something important? I think the code can be replaced with: Code: ?php $title = url_title('A man goes to', '_') ?> Question for the MySql Gurus: What happens when the title has ... appended? I cannnot find the link
[eluser]xwero[/eluser]
Since this thread is going in all directions i want to show a nice example on how to have SE friendly and at the same time user friendly urls. http://www.makeuseof.com/tag/13-alternat...ogle-cant/ : nice SE url but no way i'm going to type/remember the whole url as a surfer. So i type http://www.makeuseof.com/tag/13-alternative-search and i get the same page. I guess this is done with a like statement instead of an equal statement, and i'm sure the redirection will have a 301 error for the bots.
[eluser]IamPrototype[/eluser]
Wow, that's a nice URL that website got there!
[eluser]Erwin Setiawan[/eluser]
I have my own idea to make http://yoursite.com/blog/some-post-title-here/ first make your new column url_title on your posts table to save url title and make it unique then just use this function on url helper: url_title() Takes a string as input and creates a human-friendly URL string. This is useful if, for example, you have a blog in which you'd like to use the title of your entries in the URL. Example: Code: $title = "What's wrong with CSS?"; then use url_title($title); for where clause with unique url_title column how about this? ![]()
[eluser]drewbee[/eluser]
One other suggestion: just the way I do it so I don't have to pass another param, Is I let the program make the assumption that the first number in the string is the id ex. /blog/view/23-i-caught-my-wife-cheating-red-handed.html a simple explode by -, grab the first item, then glue her back together. I know, I know, a few more steps then to simply add another param, but hey why not. |
Welcome Guest, Not a member yet? Register Sign In |