0

General:

I am new with Drupal; so, I was trying to add new regions to Zen (sub)template, but got very confused why contents of my new-created region "content 2" appears on page above the original so called "promoted to front page teasers", which I considered to be a "content"...

Now, it seems "promoted teasers" are not in a block - and that's why they are not in a "content region"?

If so, How to put "promoted teasers" in a block?

Also confusing - what do "main page content" block? - It seems I cannot disable it and if I put "main page content" in a "content" region - my new "content 2" region appears above the "promoted teasers" ; if I put this "main page content" block in "content 2" - both content of "content 2" and "promoted teasers" appear next each other in the same row (?!)....

May be it depends somehow on CSS also?

I don't know, I just somehow assumed that "promoted teasers" are "content" region's content, but it's not - so, what should I do with it now?

Ingredients used:

Drupal 7.30

Zen 7.x.5.x

Display Suite

Views

few others...

<div id="main">

    <div id="content" class="column" role="main">
      <?php print render($page['highlighted']); ?>
      <?php print $breadcrumb; ?>
      <a id="main-content"></a>
      <?php print render($title_prefix); ?>
      <?php if ($title): ?>
        <h1 class="page__title title" id="page-title"><?php print $title; ?></h1>
      <?php endif; ?>
      <?php print render($title_suffix); ?>
      <?php print $messages; ?>
      <?php print render($tabs); ?>
      <?php print render($page['help']); ?>
      <?php if ($action_links): ?>
        <ul class="action-links"><?php print render($action_links); ?></ul>
      <?php endif; ?>
      <?php print render($page['content']); ?>
      <?php print $feed_icons; ?>

    <?php
    // content - 2 region , my own added
      print render($page['content2']); ?>
     <?php print render($page['content3']); ?>
     <?php print render($page['content4']); ?>
     <?php print render($page['content5']); ?>
      </div>

enter image description here

2 Answers 2

2

Use Views:

  • Create view of content
  • Create "Block" display
  • Use filters to only show ones with "promoted to frontpage" selected
  • In Format section set Show: Content | Teaser
  • Put your block on the frontpage

That's all.

3
  • Yes, it's kind of an answer; but - what to do with existing teasers, since they appear outside of regions or they still in some region? Aug 6, 2014 at 14:49
  • My question is not so much about Blocks, but about Regions - How the "promoted teasers" appear on my page, when they are not in any Region? Aug 6, 2014 at 15:39
  • @user1981528 they are hard-coded in Drupal core. Historical reasons, mostly. See drupal.stackexchange.com/q/1122/16495
    – Mołot
    Aug 6, 2014 at 18:06
0

What I finally found and did:

In page.tpl.php

<?php if ($title): ?>
        <h1 class="page__title title" id="page-title"><?php //print $title; ?></h1>

---> Commented out the Headline/ page title //print $title

Next: the lines:

<?php print render($page['content']); ?>

I changed to :

<?php
      if (!drupal_is_front_page()){
  print render($page['content']);} ?>

// Before I found this I also unchecked "promoted" , but I think anyway, this removes all that default staff; and also I added earlier several additional 'content 2n' regions, so I don't mind missing that on front page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.