- Posts: 217
- Thank you received: 3
Adjusting Content Restriction Output in Blog Layout for Easier Customization
- hide10
- Topic Author
- Offline
- Elite Member
Less
More
3 months 4 weeks ago - 3 months 4 weeks ago #168424
by hide10
Adjusting Content Restriction Output in Blog Layout for Easier Customization was created by hide10
Hello,
I am currently using Membership Pro with the "Hide fulltext from none subscribers" option to restrict article content. When displaying articles in a blog layout, the content generated by content_restricted_message is placed inside the <div class="item-intro">. However, for easier CSS customization, I would prefer this content to be output outside of the <div class="item-intro">.The current structure looks like this:
I would like to change it to:
I checked the files in plugins/system/osmembershiparticles/tmpl, but only found <p class="text-info"> instead of <div class="text-info">. Is there a way to achieve this adjustment through an override or any other method? Any guidance would be appreciated.
Regards
I am currently using Membership Pro with the "Hide fulltext from none subscribers" option to restrict article content. When displaying articles in a blog layout, the content generated by content_restricted_message is placed inside the <div class="item-intro">. However, for easier CSS customization, I would prefer this content to be output outside of the <div class="item-intro">.The current structure looks like this:
Code:
<div class="item-intro">
Intro text
<div class="text-info">
Content generated by content_restricted_message
</div>
</div>
I would like to change it to:
Code:
<div class="item-intro">
Intro text
</div>
<div class="text-info">
Content generated by content_restricted_message
</div>
I checked the files in plugins/system/osmembershiparticles/tmpl, but only found <p class="text-info"> instead of <div class="text-info">. Is there a way to achieve this adjustment through an override or any other method? Any guidance would be appreciated.
Regards
Last edit: 3 months 4 weeks ago by hide10. Reason: Remove automatically inserted [code] tags
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 months 4 weeks ago #168426
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Adjusting Content Restriction Output in Blog Layout for Easier Customization
Hmm
Are you using latest version of the extension? If you are using latest version, the output should be controlled by the file components/com_osmembership/view/common/tmpl/restrictionmsg.php and it should work exactly as you want
Maybe you can check it on your site to see if the above file is executed ? Could add some text there to check
Tuan
Are you using latest version of the extension? If you are using latest version, the output should be controlled by the file components/com_osmembership/view/common/tmpl/restrictionmsg.php and it should work exactly as you want
Maybe you can check it on your site to see if the above file is executed ? Could add some text there to check
Tuan
Please Log in or Create an account to join the conversation.
- hide10
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 217
- Thank you received: 3
3 months 4 weeks ago #168444
by hide10
Replied by hide10 on topic Adjusting Content Restriction Output in Blog Layout for Easier Customization
Hi,
By overriding the template and modifying view/common/tmpl/restrictionmsg.php, I was able to achieve the desired outcome. By changing the code as follows, it became easier to apply CSS:
The above code results in the HTML being output as follows, making it easier to apply custom CSS:
Thanks
By overriding the template and modifying view/common/tmpl/restrictionmsg.php, I was able to achieve the desired outcome. By changing the code as follows, it became easier to apply CSS:
Code:
if (isset($introText))
{
echo '<div class="intro-text">' . $introText . '</div>';
}
?>
<div class="text-info">
<?php echo $msg; ?>
</div>
The above code results in the HTML being output as follows, making it easier to apply custom CSS:
Code:
<div class="item-intro">
<div class="intro-text">
Intro text
</div>
<div class="text-info">
Content generated by content_restricted_message
</div>
</div>
Thanks
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 months 4 weeks ago #168446
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Adjusting Content Restriction Output in Blog Layout for Easier Customization
Great. Thanks for sharing. I will check it more and might apply the same changes to the core package
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.