By rune-bromer on
Hello,
I'm in the middle of estimating some work for a client and have a request that I'm not quire sure how to implement. I want a two-column layout on a number of pages. A lot of other pages will not have the same layout. I guess this is a pretty simple thing that a lot of people do. What would be the best approach.
The only one some what useful would be to to create a vocabulary called "sections", and assign each content to a section. Using this section one could change theme or just adjust stuff in the theme code.
Is there a cleaner solution?
Comments
...
Use a base theme like Adaptivetheme or Genesis, both print section classes on the body element which allow you theme site sections easily - site sections are grabbed from the URL, so if you have an URL like /section-one/my-page the class will be .section-one and so on.
You'll want to use Pathauto module to automatically assign the correct paths to nodes to create the "sections", either via taxonomy terms or content type or whatever tokens and method you require.
Another good way is to use Panels and Views, its more overhead and lots to learn but it is powerful once you learn how.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Hi Jeff Thank you for the
Hi Jeff
Thank you for the answer. I have enabled the pathauto module and that's fine.. Gives me nice urls, but the main problems is not solved as I can't change the theme. I build a custom theme myself, so I need some what to differentiate the layout if the node dictates a different theme than the main theme.
Before pathauth I would actually take a look at the /node// url, parse it, find the node-id, fetch the node and look at the taxonomy terms for that node. But now the path-auth stuff makes my urls different and I can't find a suitable method anywhere for lookup up the node from a url. How is that done?
Or am I off the path?
...
the nid is arg(1), always.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.