Help - hide document_byline for a Folder?

hi,
in configure.zcml i have defined view for Folder:

<browser:page|
    for=plone.dexterity.interfaces.IDexterityContainer
    name=news-listing
    class=.news_listing.NewsListingView
    template=news_listing.pt

I need to remove such 'documentByLine' when Folder is displayed:
image

how do it in news_listing.pt? I dont want do it via Permision or javascript :slight_smile:

in plone.app.dexterity-2.6.9-py3.8.egg/plone/app/dexterity/browser/folder_listing.pt i see the code:

<metal:block metal:define-macro="document_byline">
                      <div class="documentByLine">
                        <tal:byline condition="view/show_about">
                          &mdash;
                          <tal:name tal:condition="item_creator"
                              tal:define="author python:view.pas_member.info(item_creator);
                                          creator_short_form author/username;
                                          creator_long_form string:?author=${author/username};
                                          creator_is_openid python:'/' in creator_short_form;
                                          creator_id python:(creator_short_form, creator_long_form)[creator_is_openid];">
                          <span i18n:translate="label_by_author">
                            by
                            <a tal:attributes="href string:${view/navigation_root_url}/author/${item_creator}"
                                tal:content="author/name_or_id"
                                tal:omit-tag="not:author"
                                i18n:name="author">
                              Bob Dobalina
                            </a>
                          </span>
                          </tal:name>

                          <tal:modified>
                            &mdash;
                            <tal:mod i18n:translate="box_last_modified">last modified</tal:mod>
                            <span tal:replace="python:view.toLocalizedTime(item_modified,long_format=1)">
                              August 16, 2001 at 23:35:59
                            </span>
                          </tal:modified>

                          <metal:description define-slot="description_slot">
                            <tal:comment replace="nothing">
                              Place custom listing info for custom types here
                            </tal:comment>
                          </metal:description>
                        </tal:byline>
                      </div>
                    </metal:block>

Many thanks for your help.

hi, one of the solution is in my view:


    @property
    def show_about(self):
          return False

1 Like

Did you try to remove that block of code? You can also unregister plone.belowcontenttitle.documentbyline on that content type. Also, in /@@site-controlpanel, you've ` Display publication date - Show in the byline the date a content item was published." you can turn off if ticked but this applies to all. Your solution seems the best one.