Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By dj1234 on
Hi!
For a while now I am planning to convert news portal from custom made CMS to Drupal 8. "Live" editing option was persuasive enough.
The site has a following structure:
While browsing the Drupal docs I found that this could be achieved using taxonomy, however, I have problems implementing it. Does any tutorials exist for the following?
- Show, for instance, 10 latest articles regardless of the category on the first site
- Create a menu (category menu) and categories with URL www.sitename.com/menu-category-name.html that would show, for instance, 10 lates articles in this category
- When clicked on the article from that category it has to show article on URL www.sitename.com/menu-name/article-name.html
Could you point me to the right direction or maybe explain how can I achieve that?
That's it for now.
Best regards,
DJ
Comments
=-=
documentation for Drupal 8 while it is in beta is minimal. If you are building a production site please understand that there is no upgrade path from beta to beta.
Taxonomy alone won't help with paths. You will also need the pathauto.module.
If you are building a
There is now. They started adding them about a month ago.
=-=
Thank you for the enlightenment!
i think it can be easily done
i think it can be easily done with views
you can create a view of a listing of content type and limit it using filters, contextual filters and the like.
I like the universe, but she messes with my words
I'm not talking planets or galaxies and the distance just makes it worse.
I know what you're thinking, this probably sounds rehearsed.
Progress
Thank you for pointing out the views. I've created a new view called Menu page, where I've created pages like Category 1, Category 2. For each of them I've assigned the path like /category-one, /category-two etc. I've applied a filter criteria to match a taxonomy term Menu name to filter the articles.
At this point I have the first task done (menu categories as www.site.com/category-one etc.). I've just have to figure out how to show article like www.site.com/category-of-article/article-name instead of www.site.com/node/1 etc.
Could you help me out with this too?
Best regards,
DJ
you lost me there
you lost me there
if you already have a view that shows the list of content for that taxonomy, then just change the aliases of those content to 'category/title-of-ariticle'
I like the universe, but she messes with my words
I'm not talking planets or galaxies and the distance just makes it worse.
I know what you're thinking, this probably sounds rehearsed.
Yes, that's an option. But is
Yes, that's an option. But is there a more independent solution? Manually creating the alias is not the best solution here - if the category name changes, all of the aliases should change too. I was looking at pathauto module but I cannot install it in beta 13.
_
Pathauto IS the way to do this automatically. The fact that's it's not usable with d8 is typical of the issues you'll encounter as a result of using beta sw. Most modules will even lag the official release of d8 for quite a while.
If you're going to use the beta or early adopt the official release be prepared to 1) write a lot of custom code or 2) upgrade some modules from d7 to d8.
Such is life for early
Such is life for early adopters. It's why I'll be waiting quite a while before moving to D8.
_
love the new sig? Mind if I copy it? ;-)
[edit]
Done!
Feel free!
Feel free!
Now I'm thinking if it would
Now I'm thinking if it would be better to just do it robustly in D7 ... and then just migrate to D8 when it's time ... I'm still on the point where I can choose D7.