Advertisement
Author block on article page
Moderators: ooffick, General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sat Jan 24, 2015 4:19 pm
Author block on article page
Hi,
I would like to change the position of Author block on my article page, but I can't find it in default.php. I realised that this is generated by content plugin event "onContentAfterDisplay" but I cant find any php file related to this.
Can you please guide me, where can I find php code for Author module generated by "onContentAfterDisplay"?
thank you!
I would like to change the position of Author block on my article page, but I can't find it in default.php. I realised that this is generated by content plugin event "onContentAfterDisplay" but I cant find any php file related to this.
Can you please guide me, where can I find php code for Author module generated by "onContentAfterDisplay"?
thank you!
Advertisement
- toivo
- Joomla! Master
- Posts: 17847
- Joined: Thu Feb 15, 2007 5:48 am
- Location: Sydney, Australia
Re: Author block on article page
Do you mean the block starting with the heading Details, followed by the author's name, the category, the date and the number of hits?
Go to the first tab in Articles - Options and locate 'Position of Article Info'. The selections in the dropdown are Above, Below and Split.
Go to the first tab in Articles - Options and locate 'Position of Article Info'. The selections in the dropdown are Above, Below and Split.
Toivo Talikka, Global Moderator
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sat Jan 24, 2015 4:19 pm
Re: Author block on article page
hi Toivo, thank you, but not exaclty.
at the end of the article there's a part with extra fields and author info.
in the default.php (\com_content\tmpl\article\) there is no code responsible for generating extra fields and author info. I realised that the last lines of this file are refering to it:
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
so, I was looking for a "plugin event "onContentAfterDisplay"" , but I couldn't. As I understand, in this plugin event I will find a code responsible for extra fields and author info.
best
at the end of the article there's a part with extra fields and author info.
in the default.php (\com_content\tmpl\article\) there is no code responsible for generating extra fields and author info. I realised that the last lines of this file are refering to it:
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
so, I was looking for a "plugin event "onContentAfterDisplay"" , but I couldn't. As I understand, in this plugin event I will find a code responsible for extra fields and author info.
best
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sat Jan 24, 2015 4:19 pm
Content is generated by content plugin event onContentAfterDisplay
Hi,
I wanted to modify some of php code related to "fields " and "author" but I realized that in the article and category page it is not placed in the php file. It is generated by a plugins:
<?php // Content is generated by content plugin event "onContentAfterTitle"
?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"
?>
<?php echo $this->item->event->beforeDisplayContent; ?>
Can you please guide me where to find these plugins?
thank you in advance!
best
I wanted to modify some of php code related to "fields " and "author" but I realized that in the article and category page it is not placed in the php file. It is generated by a plugins:
<?php // Content is generated by content plugin event "onContentAfterTitle"
?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay"
?>
<?php echo $this->item->event->beforeDisplayContent; ?>
Can you please guide me where to find these plugins?
thank you in advance!
best
Last edited by toivo on Thu Feb 22, 2024 3:45 am, edited 2 times in total.
Reason: mod note: moved from 5.x General Questions, merged with the current topic
Reason: mod note: moved from 5.x General Questions, merged with the current topic
- Pavel-ww
- Joomla! Ace
- Posts: 1722
- Joined: Tue Jun 30, 2020 12:17 pm
Re: Content is generated by content plugin event onContentAfterDisplay
Hi. In 90% of cases, it is enough to use only CSS to change the appearance or layout. Describe what you want to change, provide a screenshot and link to the page
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sat Jan 24, 2015 4:19 pm
Re: Author block on article page
hi, thank you but not in this case.
In my fronted, in an article page I have:
<div class=card text-white bg-success mb-3">...
<div class="card-header">..
<div class="card-body">..
<div class="author-block author-block-post-detail pos-after-content">... <--- THIS IS AUTHOR BLOCK
...
<ul class="fields-container">... <--- THIS IS ARTICLE FIELD
...
everything above is generated by <?php echo $this->item->event->afterDisplayContent; ?> in article/default.php.
What I want to do, is to move "author-block" (<div class="author-block author-block-post-detail pos-after-content">) from the "card text-white bg-success mb-3". I can't do it iny CSS and I cant find any code with "ul class="fields-container".
best regards
In my fronted, in an article page I have:
<div class=card text-white bg-success mb-3">...
<div class="card-header">..
<div class="card-body">..
<div class="author-block author-block-post-detail pos-after-content">... <--- THIS IS AUTHOR BLOCK
...
<ul class="fields-container">... <--- THIS IS ARTICLE FIELD
...
everything above is generated by <?php echo $this->item->event->afterDisplayContent; ?> in article/default.php.
What I want to do, is to move "author-block" (<div class="author-block author-block-post-detail pos-after-content">) from the "card text-white bg-success mb-3". I can't do it iny CSS and I cant find any code with "ul class="fields-container".
best regards
- Pavel-ww
- Joomla! Ace
- Posts: 1722
- Joined: Tue Jun 30, 2020 12:17 pm
Re: Author block on article page
Hi. This code is not typical for the article. Are you sure you are talking about the article?kalixo wrote: ↑Sat Feb 24, 2024 9:01 pm <div class=card text-white bg-success mb-3">...
<div class="card-header">..
<div class="card-body">..
<div class="author-block author-block-post-detail pos-after-content">... <--- THIS IS AUTHOR BLOCK
...
<ul class="fields-container">... <--- THIS IS ARTICLE FIELD
...
---
And from the "card text-white bg-success mb-3" ... to where?
Just provide a link to the page
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sat Jan 24, 2015 4:19 pm
Re: Author block on article page
hi,
thank you for your help! let me answer your questions:
"i. This code is not typical for the article. Are you sure you are talking about the article?" - yes it is. Purity VI template: https://www.joomlart.com/documentation/ ... -purity-iv
"And from the "card text-white bg-success mb-3" ... to where?"
to the bottom of the whole page, under under the fields, before the tags.
webstie is still under the development.
link to an article:
https:// darmolandia.pl /test-finish-za-darmo-zwrot-pieniedzy
best
thank you for your help! let me answer your questions:
"i. This code is not typical for the article. Are you sure you are talking about the article?" - yes it is. Purity VI template: https://www.joomlart.com/documentation/ ... -purity-iv
"And from the "card text-white bg-success mb-3" ... to where?"
to the bottom of the whole page, under under the fields, before the tags.
webstie is still under the development.
link to an article:
https:// darmolandia.pl /test-finish-za-darmo-zwrot-pieniedzy
best
- Pavel-ww
- Joomla! Ace
- Posts: 1722
- Joined: Tue Jun 30, 2020 12:17 pm
Re: Author block on article page
Hi. You should mention this from the very beginning. If you use this template, then you should look at its documentation or contact its support with your questions. Since this template has its own overrides from the box differing from standard layouts supplied with Joomla.
Or wait for someone who knows this template.
As for the onContentAfterDisplay event, read the documentation on plugin events in Joomla https://docs.joomla.org/Plugin/Events. I suppose you do not understand this correctly.
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sat Jan 24, 2015 4:19 pm
Re: Author block on article page
hi,
ok, will do. What about fields? Fields are also overwritten by the template?
Right now, I see in my default.php (com_content/article):
<div class="card-body"><?php echo $this->item->event->afterDisplayContent; ?></div>
and in code of generated page:
<div class="card-body">
<div class="author-block author-block-post-detail pos-after-content">
[...] </div>
<ul class="fields-container">
[...]</ul></div>
I would like to add extra div before <ul class="fields-container"> and move it before <div class="author-block author-block-post-detail pos-after-content">
how can I do it?
best
ok, will do. What about fields? Fields are also overwritten by the template?
Right now, I see in my default.php (com_content/article):
<div class="card-body"><?php echo $this->item->event->afterDisplayContent; ?></div>
and in code of generated page:
<div class="card-body">
<div class="author-block author-block-post-detail pos-after-content">
[...] </div>
<ul class="fields-container">
[...]</ul></div>
I would like to add extra div before <ul class="fields-container"> and move it before <div class="author-block author-block-post-detail pos-after-content">
how can I do it?
best
Advertisement