Conditional Content

Is there a way to apply this automatically to blog articles?

10 months 4 weeks ago #76245

Ita Corrigan's Avatar Ita Corrigan

hi Peter,
i'm wondering if i can use this extension to get around a problm i'm having.
I have an articles-category module on my home page which displays the latest blog items. It will only display registered blog entries once the user has logged in.
What i'm trying to do is display all articles but to prompt for a login for those articles i want kept more private.

The blog articles are created from the front end by several people so i want to keep things as simple as i can.
Can i apply Conditional Content to the blog category so that any article with that category includes a login prompt, without the article creator having to do anything?

Is it possible to include a login module within Conditional content?

(Joomla 3.7)

many thanks

10 months 4 weeks ago #76247

Peter van Westen's Avatar Peter van Westen Admin

Conditional Content can only control (show/hide) the content between the opening and closing tags.
As far as I understand you want, this won't be possible with Conditional Content.

But you can create what you want using Articles Anywhere Pro (inside a Custom Module) instead of using the Articles Category module.
Something like:

{articles category="My Category"}
   {if has_access}
       [link][title][/link]
   {else}
       <a href="link/to/whatever/you/want">[title]</a>
   {/if}
{/articles}
New lines and indentation in above code are just so it is more readable. You don't need that in your implementation.

10 months 4 weeks ago #76269

Ita Corrigan's Avatar Ita Corrigan

thanks Peter, i'll give the pro version of articles anywhere a go.

10 months 4 weeks ago #76271

Peter van Westen's Avatar Peter van Westen Admin

Ok, let me know how it goes :)

10 months 3 weeks ago #76355

Ita Corrigan's Avatar Ita Corrigan

hi Peter,
i thought i'ld start off with a really simple example, but it's not working. I'm obviously not grasping something in the set-up.
Appreciate if you could point me in the right direction

Confidential information:
(hidden)

10 months 3 weeks ago #76359

Peter van Westen's Avatar Peter van Westen Admin

You do not have the Pro version of Articles Anywhere installed.
Also the Free version you do have installed seems to be broken (missing stuff). So reinstall it.

10 months 3 weeks ago #76369

Ita Corrigan's Avatar Ita Corrigan

Peter,
sorry about that, I was sure I had installed the pro version.
I've installed pro now. Would you mind checking that everything is as it should be.
many thanks
Ita

10 months 3 weeks ago #76371

Peter van Westen's Avatar Peter van Westen Admin

Looks fine.
So is it working as expected?
If not, can you tell me where exactly you placed the code, on what url (and where on the page) I can see the issue, and what you expect to see instead.

10 months 3 weeks ago #76379

Ita Corrigan's Avatar Ita Corrigan

i've placed the code in module - home page article list, to be displayed on the home page.

I'm expecting to see a list of articles from the Club News category, but none are appearing.

10 months 3 weeks ago #76380

Peter van Westen's Avatar Peter van Westen Admin

Please read the documentation on the syntax.
You are nw mixing the old {...} data tag syntax with the new [...] syntax.
Check your Articles Anywhere Data Tag Syntax setting to see what you should use.
www.regularlabs.com/extensions/articlesanywhere/tutorial

10 months 3 weeks ago #76394

Ita Corrigan's Avatar Ita Corrigan

hi Peter,
got it working, thanks for all you help, a fantastic extension, does exactly what i need.
many thanks
Ita

10 months 3 weeks ago #76395

Peter van Westen's Avatar Peter van Westen Admin

Great to hear :)