Upcoming events module and menu item

More
10 years 7 months ago #56886 by marc.light
Hi,

I'm trying to create an upcoming events module with FLEXIcontent's Universal Content module. I checked the settings and I think it's possible but can't seem to get it right.

Here's what I've got. I created a new Item called "Event" with a new field "Event date" (using the date field type). "Event date" is the field I want to use to filter. I want the module to show the next 3 upcoming events. I'd also want a menu item to list all the upcoming events.

One other thing with the module is the date format. I'd like to use a different date format than the one assigned in the "Event date" field but I have no clue how to do it or if it's even possible. If it's not possible, it would be a great feature for anyone who wants to use FLEXIcontent's calendar feature.

Thanks for your help.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #56887 by ggppdk
Hello

display of a date field can be custom (see parameters) but the way that it is stored in DB is specific


For menu item you can do it,

there is powerful feature:
- locked filter values parameter
you can require a field have specific values or be in greater or less than a value, or be in a range (see popup description of the parameter in the Search / Filters / Alpha-index)

- also you can define the menu item (category view) to have custom order by your event date filter


For module the date scope can do it, it can filter the item list by a custom date field so i am not sure what you are asking


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #56894 by marc.light
OK, for the module:

I want it to show the next upcoming 3 events. So under "Module", "Number of items", I have put 3.

Under "Item List: Select Items", "Advanced Filtering", "Category Scope", I included the event category. This shows all the events in ascending date. So far, so good.

Now I don't want the pass dates to show. So under "Date Scope", "Behavior" I selected Dynamic FROM/TO custom offset, From "0 d" To "No limit". If I apply these settings, no events shows.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #56897 by ggppdk
Hello

-- make sure no other FILTERING scopes are active
(or better , delete and recreate the module to make sure nothing else is active)


-- in date scope select:
custom date field

and make sure that you have read the popup descriptions of
-- what custom offset does
-- you compare the date field to what ? configure this too


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #56918 by marc.light
OK, got the module working. Thanks a lot.

Now in my item view, I want the full date displayed, so in my date field under "Custom format" I entered "F j, Y, g:i a". This works great. Now, in the module, I'd like a different date format like JAN 24. Is it possible? If not, would you consider adding this feature?

Thanks.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago - 10 years 7 months ago #56919 by ggppdk
Hello

you cannot do have via configuration different display of the date field in the module,

you may only create your own Universal module template and do via coding
using inside the template file:
Code:
$field_id = 44; print_r($item->_row->fieldvalues[$field_id]);

Using the raw value of a field inside a template file or inside a new custom field type


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Last edit: 10 years 7 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #56923 by marc.light
I'm almost there :)

I installed the sourcerer plugin where I can add PHP code in a field. I'm using the "Closing text for Field" and will use divs to display the right format with CSS. Now, how can I get the data needed?

SELECT value FROM flexicontent_fields_item_relations WHERE item_id = {{item->id}}

Thanks and hopefully this will help others.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #56924 by ggppdk
Hello

to execute a query you would need a custom template,

but if you have a custom template then you do not need to make a query you can use (as said before):
Code:
$field_id = 44; print_r($item->_row->fieldvalues[$field_id]);


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #57238 by marc.light
Hi,

I was able to get the module working for upcoming events. I'm not able to do the same for the menu item FLEXIcontent - Category. I can sort by the events date, ascending. Everything is like it should. What I'm trying to do is only show the upcoming events based on the date.

Can anyone help?

Thanks.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago - 10 years 7 months ago #57245 by ggppdk
Hello

use the publish up date (publish start date)

- this way category view will not list items that are not yet published
- you don't need to have
publish_up date = event date
it can be different

then in universal module you can configure to show according to publish_up date and sort by event date

- NOTE: module can show not yet published ITEMs, but category view can not


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
Last edit: 10 years 7 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save