is it possible to open full articles in a modal...

Search
Other Pre-Sale questions
Forum

is it possible to open full articles in a modal from the blog-category view ?

Eric Fréget's Avatar Eric Fréget
My client ask me to open the full articles from the blog-category view, link here:
https://freget-glaser.fr/testfg/2022-03-18-07-12-59/2022-03-18-07-12-59
Is it possible with modals?
thx

Eric
Peter van Westen's Avatar Peter van Westen ADMIN
Yes, see: docs3.regularlabs.com/modals/going-further/auto-convert

Or create a template override for that category blog view and use the {modal} tags in there.
Please post a rating at the Joomla! Extensions Directory
Eric Fréget's Avatar Eric Fréget
thx for the fast answer.
In my case, as the full post is opening from a click on the title (not a readmore link), is there a simple way to add the option ? I read the documentation but still feel a little bit lost.
I looked into the category blog view and didn't saw any clear place to add the modal tag and it is already overrided by the Nicepage app and template used in the website.
All the posts must open in a modal from a click in the title link.
Is it this option ?
"Quick links
Easily create modal popups for articles with the article attribute, thumbnailed images with the image attribute, and videos with youtube / vimeo attributes."

Thx a lot !

Eric
Peter van Westen's Avatar Peter van Westen ADMIN
You could trigger it via a classs name, or part of the URL. Or indeed use a template override to add the classname or {modal} tag to trigger Modals.

These are no longer pre-sales questions, but implementation questions.

If you need further help, please purchase a subscription.
Please post a rating at the Joomla! Extensions Directory
Eric Fréget's Avatar Eric Fréget
fine.
I will buy it and eventually use the refund option if it doesn't fit my needs.

Thx you

Eric
Eric Fréget's Avatar Eric Fréget
hello again.
So I bought the plugin and I have added the class name to open the full articles in a modal but it open the whole website not only the text of the article. What I want is what I get on the "equipe" page when you click on the profiles names.
And I don't get where I could tweek the template overide because there is no link to replace in the blog.php.
Thx you

Eric
Peter van Westen's Avatar Peter van Westen ADMIN
Modals should - for internal urls - add a ?ml=1 to it, so that it only shows the component area in the modal.
This DOES happen on the article page. But not in the list view.
So not sure what is happening there. Probably something funky going on with your template or the Nicepage thing.

I recommend you make a template override for that list view and replace the linked titles with {modal} tags.

So instead of something like:
<a href="<?php echo $link; ?>>
   <?php echo $title; ?>
</a>
Change it to;
{modal url="<?php echo $link; ?>}
   <?php echo $title; ?>
{/modal}
Please post a rating at the Joomla! Extensions Directory
Eric Fréget's Avatar Eric Fréget
Sorry to bother you once more.
I found this in "blogTemplate_0_blog_1" in the directory view of my template :
<?php if ($titleLink0): ?><a class="u-post-header-link" href="<?php echo $titleLink0; ?>"><?php endif; ?><?php echo $title0; ?><?php if ($titleLink0): ?></a><?php endif; ?>
          </h5><?php endif; ?>

I'm afraid to make mistakes because I just can "guess" php code.
But do you think this is correct ?
{modal url=<?php if ($titleLink0): ?><a class="u-post-header-link" href="<?php echo $titleLink0; ?>"><?php endif; ?><?php echo $title0; ?><?php if ($titleLink0): ?></a><?php endif; ?>{/modal}

thx you !
Peter van Westen's Avatar Peter van Westen ADMIN
You shouldn't be changing template files. They will probably get overridden when you update the template.
Look into template overrides. Ask your template developer about that.

The {modal} tags generate a link (<a> tag).
So if you want to change a standard <a> tag to a {modal} tag, you need to replace the <a> tag with the {modal} tag.

So something like:
<?php if ($titleLink0): ?>
  {modal class="u-post-header-link" url="<?php echo $titleLink0; ?>"}
<?php endif; ?>

<?php echo $title0; ?>

<?php if ($titleLink0): ?>
   {/modal}
<?php endif; ?>
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in