OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
automatic deactivate show instance in Site Builder (0 viewing) 
Go to bottom Favoured: 0
TOPIC: automatic deactivate show instance in Site Builder
#45351
admin (Admin)
Admin
Posts: 7328
graph
User Offline Click here to see the profile of this user
automatic deactivate show instance in Site Builder 6 Days, 13 Hours ago Karma: 85  
Hi, I use CCK

On the startpage, left side, you see some advertisements (these are CCK instances).

Is it possible, that they can automatic deactivated after e.g. 30 days? Or much better, after a number of days, which the creator can select.

Best regards, Marc



Hello

1.Please check: all layouts for show many items(Instances) in OrdaSoft site builder
You create in Layout manager, as "Show All instances" layout or "Show category" layout.
And to this layout you added "Show instance layout" (as attachment layout) - which will loop. In This attachment layout you see "SQL where" option and "select+field" option. Please check attachment image.

2.In Entity which you created for instance, you need add some "date field" as example (create date), in this date_field as default value in "Add instance layout" - you need set "Current date" (we have so settings for date field).

3. And in your layout from point 1, in "SQL where" option and "select+field" option
You will need select this field and add "SQL Where condition" for your date field
some like:

Code:

and instance.datetime_popup_11 < DATE_ADD(NOW(), INTERVAL -1 MONTH)


where "instance.datetime_popup_11" your date field which you added with help
"-select+field- option"

When you will debug SQL query, please turn on "Debug" and Max errors report in "Joomla global settings" - with that you will see where error in your SQL syntax.

So with help SQL - you may add any conditions for show your instances

Regards
OrdaSoft team
 
Logged Logged
 
Last Edit: 2021/04/29 07:07 By admin.
  The administrator has disabled public write access.
Go to top