Making-Websites-With-October-CMS icon indicating copy to clipboard operation
Making-Websites-With-October-CMS copied to clipboard

Better url links for rainlab blog

Open queengab opened this issue 5 years ago • 0 comments

Expected behavior

Hi Ivan,

iwas wathcing your video about better url for October CMS. https://www.youtube.com/watch?v=sZXdruO2ac8&feature=youtu.be

I don't kwon which is the best way to achive this result also for post in rainlab blog. So i'd like to have a final url like /notizia/year/slug and a categoris page with pagination /notizie/year/1...2....3 ect ect perhpas beaware to avoid news url that have a url like /notizia/year/3(the third page)/slug

Actual behavior

To workaround the problem i have a page for single blg post with this url: /notizie/:category/notizia/:slug in this way i havent the /default problem and pagination works on categories page

Reproduce steps

Inside my partial that display news on home page i try to create the code:

            <h3>
                <a href="{{ 'notizia'|page({ category: category.slug[0].slug, slug: post.slug }) }}">
                    {{ post.title }}
                </a>
            </h3>

            {% for categories in post.categories %}
                <a href="/notizie/{{ categories: childcategories.slug, pagination }}">{{ genre.genre_title }}</a><br>
            {% endfor %}

The problem is referencing to pagination that doesnt work for categories pages and print on myrl the child categories of the first category.

Don't know if this is the right way or is it bettere to use routes.php but don't how how it works.

October build

458

queengab avatar Oct 11 '19 16:10 queengab