The blog looks beautiful but the url looks ugly. What looks better this:
The second one is easier to read and looks way more descriptive than just a number. If only there was some cool kind of tool to use to handle this for me.
Well there is. It's called Klien and I'm getting ready to install it and use it in this blog. So get ready for some pretty urls.
First thing is to install Klien.
php composer.phar require klein/klein
And now I can use the tool to create the routes. But first I need to create the links I want on the website.
So in the aside bar I've updated the menu links.
<li><a href="/building-a-blog/<?= $blog['blog_permalink'] ?>"><?= $blog['blog_title'] ?></a></li>
So I'll call the klient tool.
$klein = new \Klein\Klein();
Klien uses the MVC pattern and separates the view from the controller. If I create a views directory I can store my HTML in that folder for my pages. I'll create a home.php file and paste my home page HTML in it.
I'm gonna be reusing some of the HTML in all the pages so I'll create a partials directory to put my reusable HTML. And I'll create a file called header.php for the top of the HTML pages. And I'll create one called footer.php for the bottom of the HTML pages.
I'll create a view for the blogs and call it blog.php. And I can reuse my header and footer HTML. I'll also create a category view so I can view all the blogs in a single category.
Next I'll create three page routes. One for the home, category, and blog page. And since I'm handling the urls differently I'll update the links to the blogs to be
/blog-category/blog-title. And that will make for some very sexy urls. These aren't pretty urls they're sexy.
I'll update my previous blog and next blog functions to use the sexy urls. And I'll update my side bar menu to use the sexy urls.
Wow that was actually a little difficult. But the rewards are worth it. I hope you have a very Merry Christmas!!!
http://t-links.org/EZjAi12N real sex dating near you!
order sildenafil pill - <a href="https://bestusasild.com/">viagra 50 mg</a> buy viagra 50mg sale
buy clavulanate generic - <a href="https://gaugmentin.store/">buy generic augmentin 625mg</a> brand tadalafil 20mg
bactrim 480mg uk - <a href="https://xviagrpill.today/">sildenafil 50mg pills for men</a> order sildenafil for sale
o8kK6b <a href="http://qxesgttjecud.com/">qxesgttjecud</a>, [url=http://tgjxoveeayzd.com/]tgjxoveeayzd[/url], [link=http://narykxxzflja.com/]narykxxzflja[/link], http://igjjiejxqbgb.com/
purchase cephalexin online cheap - <a href="https://clindamycin.store/">order cleocin 150mg online</a> cost erythromycin
order fildena 100mg - <a href="https://stromectolx.store/">buy ivermectin 6mg</a> price of ivermectin tablets