Drupal 8: How to render every child page under the parent? - drupal-8

I would like to render all the subpages under top level page in Drupal 8. My site navigation has only top level pages and if they have any sub pages I would like to display them like a one pager where all of the pages are on a single view.
How to approach this? Can this be done in page.html.twig or do I need to make a custom module with some hooks to alter the page content?
So if the sitemap would be like this:
Fruits
Banana
Orange
Grapes
Vegetables
Potato
Tomato
Broccoli
Animals
Dog
Cat
Goat
And the user would go to 'fruits' site render would be like:
Fruits
Banana
Orange
Grapes

Why don't you just create the three top level pages with the "subpages" as their content, you could still link to those "subpages" or areas with anchors. Then no trickery is needed with the rendering.
And what is the desired behavior if you click on "banana"? The same as if you clicked on Fruits, only scrolled to the banana section?
What are those pages exactly? Static content, a categorization (thus a collection of nodes or something), or something else?

Related

Blogger Emporio templete: Add second line of text on homepage snippets

My blog is https://testfnm.blogspot.com based on the Blogger Emporio template.
On the homepage, under the titles of the snippets, I would like to add a second line of text with the country name.
So for instance, under the title "Milford Sound" I would like to add the country name "New Zealand". Similarly, under Amsterdam, I would like to add Netherlands. And so on...
How do I do that please?
As an alternative to adding a second line of text to the snippets, I have found a method to make the Labels permanently visible on the snippets of the homepage. I have put only one label per post, the label being the country name. Thus against each snippet a label (the country name) is now visible both on desktop and mobile.
I used this CSS code to make the labels visible:
.labels-outer-container {opacity: 1 !important;}
body.feed-view .post-labels {display: inline-block;}
You can see how the results look here: https://www.firozemistry.com

Where do I set fields that can be edited in Sitecore editor options?

Where in sitecore do I configure what fields are displayed when I click this button? (Currently, it lists 3 of the 7 fields that are on the template, I'd like to add another to be editable).
Screenshot
It is one of Edit Frame buttons. When you open your control markup, you see something like this:
<sc:EditFrame ID="editFrame" runat="server" Buttons="/sitecore/content/Applications/WebEdit/Edit Frame Buttons/Default">
...
</sc:EditFrame>
It differs for MVC, but is similar. You need to get Buttons attribute value.
When you open /sitecore/content/Applications/WebEdit/Edit Frame Buttons/Default path in core database you see list of children. It is your buttons. For your case it should be only one button: Edit Item. This item has Fields field where using pipe as delimiter is list of fields that are available for editing.

How to setup a Django CMS 3 menu sitetree?

I want to have multiple site trees and, dependent of the role, display the corresponding menu.
For instance; this is my menu:
Site
Home
Products
Contact
User
Start
Admin
Now i can display my menu for a User like this:
{% show_menu_below_id "User" 0 1 0 1 %}
That will look like this: Start | Admin
The problem is that i want to have it start on "User/Start" and not on "User".
The url: /user/ should actualy by /user/start/
"User" should act like a tree node and i just need it to have an id to display the right tree, but that is about is, i do need it to start at... "Start".
I find it hard to find all ins en outs of Django CMS3 and i am sure/hope this is possible, but can not figure out how? I am not even sure where to look.
I found: add CMS_REDIRECTS = True to the settings.
then you can hardcode a url in the extra fields in the CMS.
Would be nice if it was not hardcoded, but i can continue now.

Componentheading and contentpagetitle joomla

If have a problem with the componentheading and the contentpagetitle.
I got a sectionblog for my articles. The title of the page is a componentheading. The title of the articles (intro) is a contentpagetitle.
If I click on the title of a article, I can see the entire article. The title of the page is now the title of the article (contentpagetitle), and that is good.
The problem is, this title now needs the same layout as the componentheading. But if I do this, the titles of the articles also get this layout in the sectionblog
How can I make sure I got 2 different styles, or the contentpagetitle changes in a componentheading while looking at the full article?
I you don't uderstand what I'm saying just go to http://csm.infowebpreview.be/nl/realisaties, and click on the first title 'Realisatie'. The full article opens and the title 'Realisatie' should be underlined now.
Or this is also correct: if an article is the only article on a page the title should get another layout
Thanks
You can do this by being more specific with the CSS selector -
This one will apply to all of the titles, make this one the one for the main heading with the underline -
h2.contentheadingrealisaties{border-bottom: 1px solid #333}
Then use this to single out the article titles in a listing:
.leadingrealisaties h2.contentheadingrealisaties{border:0;}
Obviously you will need to add in the rest of the CSS, but this will get you started.

Magento:How to display drop down attribute on the product listing page

I have created a drop down attribute with a configurable product.
I would like to add in the grid/list product’s page the combo with the choice of my select attribute in order to be able to put in directly from this page the product into my cart wich is impossible for the moment : i have to go on the second page to choose the attribute.
i’ve read a lot of threads but i don’t find a way to achieve it.
thanks for the help.
So you want product "add to cart button" with "custom attributes" to be added to the product listing pages..there's an extension for this, see below:
http://www.mageworx.com/ajax-cart-magento-extension.html
I have only managed to add an "add all item to cart" button and "add to cart" button on my category listing pages.
For the attributes which have a frontend type “Select” we need to define options that on the product page converted into a dropdown. For example attribute color may have options Red, Green, Blue etc. which are defined in the admin area.
We can easily collect all the defined options for any attribute.
// use your own attribute code here
$attribute_code = "color";
$attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
$options = $attribute_details->getSource()->getAllOptions(false);
Foreach($options as $option){
// print_r($option) and find all the elements
echo $option["value"];
echo $option["label"];
}
For more information about magento cart products, visit our Web\Agency-shop