Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#925 2024-09-21 14:29:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,430
Website GitHub

Re: smd_calendar: complete schedule / event / calendar / diary

Hmm. Are you trying to display the child events only? Or the tree with both the parent > child displayed?

And are these shown inside each relevant cell of the calendar in which the child events occurs, or are you displaying them as a list nearby for people to click on and show on the calender?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#926 2024-09-28 15:42:45

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 112
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Maybe I should mention I’m using smd_article_event to create a page of listings and NOT the calendar box.

I want to be able to show ALL child events in a category. I can successfully show individual child events in a category category.

Eg, Parent: Screenings (0 articles) Children: Just Released, Now Playing, Art House, For the Kids (Many articles)

Parent: Music (0 articles) Children: Rock, Hip Hop, Ska, Rick Rolls (Many articles)

I have no problem displaying Just Released or Hip Hop, or displaying everything, but I can’t get it to display ‘Just Released, Now Playing, Art House, For the Kids’.

I use the the following to create the page of listings either for all events available and for all events in a category.

<txp:smd_article_event stepfield="custom_1" skipfield="custom_2" 
omitfield = "custom_22" allspanned = "1"  time = "future, today" 
category = '<txp:category />'  subcats='1'  from = '<txp:variable name = "start" />' 
to = '<txp:variable name = "end" />'  limit="75">
<Display event code>
</smd_article_event>

Offline

#927 2024-09-28 17:13:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,430
Website GitHub

Re: smd_calendar: complete schedule / event / calendar / diary

amordecosmos wrote #337899:

Maybe I should mention I’m using smd_article_event to create a page of listings and NOT the calendar box.

Okay, that’ll be why then. That tag doesn’t currently accept the subcats attribute, for reasons I cannot remember. If you stick your site in testing/debugging mode you should see the warning.

You can hack it with a little indirection though, by using the category_list tag to grab all the children and just slap that in the article_event tag. Assuming you’re on a page that has set the parent category context (e.g. Screenings, Music, …) then:

<txp:variable name="cats"><txp:category_list parent='<txp:category />' exclude children="1" break=","><txp:category title="0" /></txp:category_list></txp:variable>

Will make you a variable containing a nice comma-separated list of subcats to plug into the category attribute of the plugin tag.

Hope that helps.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#928 2024-09-28 17:59:43

amordecosmos
Plugin Author
From: London (Hometown: Vancouver)
Registered: 2004-08-03
Posts: 112
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Thank you, that worked a treat. It really is a super versatile plugin.

Offline

Board footer

Powered by FluxBB