13 Posts
bright
10 years ago
12
Topic
hi

I have a sidebar with newsflashes.
In the sidebarI can see the introtext an the read more button. When I click the read more button - intro and fulltext is shown. correct!
But - I have articles with only an introtext an no fulltext. This articles are shown with read more button as well. I don't want a readmore in case I have no fulltext.

need your help - thanks

(same situation if I have no introtext - I can see the button read more)

Get a Book for SEBLOD
10 years ago
1
Level 1
Use button read more button has conditional field
13 Posts
bright
10 years ago
0
Level 2
Thanks for you reply - but - how can I use the readmore button as conditional field?
I use the default article readmore

Thanks for your help
10 years ago
0
Level 1
I too would like to know how to do this. Can you explain how to do a conditional read more button?

Thanks
Michael.
10 years ago
0
Level 1
Is there no one that has an answer to this?

Actually there is an answer "Use button read more button has conditional field" but no one know how to do this?

Thanks
Michael.
13 Posts
bright
10 years ago
3
Level 1
can anyone help us?
I need the readmore button only, if I have some text in the fulltext.
If the fulltext is empty - I don't want a readmore

Thanks for your help
178 Posts
Jeka
10 years ago
2
Level 2
Hi.
There is two way to do that.
First. I you use default template without overriding and custom templating.
In your content type configuration on needed view go to button 5 and find your button field. Click on add in Conditional States column.
Set this field is hidden when your fulltext field is empty.

If you use custom teplate or override you can do that with php if/else.
10 years ago
1
Level 3
Thanks for that. I think the issue is I don't have button 5 - just 1 to 4. I am using the seb_one template. Any ideas how to get button 5?
178 Posts
Jeka
10 years ago
0
Level 4
Hi.
Please, upload some screenshots.
10 years ago
3
Level 1
Hi all,
thank for your posts.

There is multiple way for doing that but with SEBLOD functionnality, and not Joomla functionnality

In the form :
  • 1 field for introtext
  • 1 field for fulltext

In the Item view of your search type:
  • The introtext field
  • the fulltext field
  • a freetext field with the link on it
Now, 2 solutions to display or not the readmore button:

1 - using a variation in which you make your tests and display fields like you want

2 - Using a plugin field code "BeforeRender" to modify the array "$fields":
  • test the $fields['fulltext_field']->value
  • if empty unset( $fields['readmore'] );

Hope it will help.

Regards.
Lionel
13 Posts
bright
10 years ago
0
Level 2
thanks for your answer - but

I use no "search type"
I use Intro and Content as "Form and Content Type" with standard article in seblod

any solutions? THANKS

10 years ago
1
Level 2

Hi Lionel

Thanks for the tips, but I'm not understanding what needs to be done. To me this seems like it should be core functionality.  

I have managed to get the Read More link to show, now I am not sure how to make this conditional to only show when FullText has content.

Thanks

Michael

9 years ago
0
Level 3

This is a core functionality.  The question i would like to know is how to do this for a list view so I can use it with a module.

Get a VIP membership