scheduler extension + r:children:each

View: New views
6 Messages — Rating Filter:   Alert me  

scheduler extension + r:children:each

by Mark Gallop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I have the scheduler extension installed and use the following code in a
layout:

<r:find url="/news-and-events">
<r:children:each limit="5" order="desc" by="published_at">
<div class="entry">
  <h3><r:link /></h3>
  <p class="info">Posted <r:date format="%b %d, %Y" /></p>
</div>
</r:children:each>
</r:find>

Now this is showing links to pages which have expired as r:children:each
ignores the expires_on value for the page.

I wonder if anyone can advise whether I would need to create my own tag
to filter the children, or is it already possible to exclude expired
pages using existing tags?

Cheers,
Mark
_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: scheduler extension + r:children:each

by Sean Cribbs-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mark,

It should obviously be doing that for you!  My apologies.  Let me patch
in something real quick.

Sean

Mark Gallop wrote:

> Hi all,
>
> I have the scheduler extension installed and use the following code in a
> layout:
>
> <r:find url="/news-and-events">
> <r:children:each limit="5" order="desc" by="published_at">
> <div class="entry">
>   <h3><r:link /></h3>
>   <p class="info">Posted <r:date format="%b %d, %Y" /></p>
> </div>
> </r:children:each>
> </r:find>
>
> Now this is showing links to pages which have expired as r:children:each
> ignores the expires_on value for the page.
>
> I wonder if anyone can advise whether I would need to create my own tag
> to filter the children, or is it already possible to exclude expired
> pages using existing tags?
>
> Cheers,
> Mark
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@...
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>  

_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: scheduler extension + r:children:each

by Mark Gallop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wow, top service ;) Thanks, Sean.

Mark

Sean Cribbs wrote:

> Mark,
>
> It should obviously be doing that for you!  My apologies.  Let me patch
> in something real quick.
>
> Sean
>
> Mark Gallop wrote:
>  
>> Hi all,
>>
>> I have the scheduler extension installed and use the following code in a
>> layout:
>>
>> <r:find url="/news-and-events">
>> <r:children:each limit="5" order="desc" by="published_at">
>> <div class="entry">
>>   <h3><r:link /></h3>
>>   <p class="info">Posted <r:date format="%b %d, %Y" /></p>
>> </div>
>> </r:children:each>
>> </r:find>
>>
>> Now this is showing links to pages which have expired as r:children:each
>> ignores the expires_on value for the page.
>>
>> I wonder if anyone can advise whether I would need to create my own tag
>> to filter the children, or is it already possible to exclude expired
>> pages using existing tags?
>>
>> Cheers,
>> Mark
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@...
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>  
>>    
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@...
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>  

_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: scheduler extension + r:children:each

by Sean Cribbs-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.radiantcms.org/radiant/changeset/740

Cheers,

Sean

Mark Gallop wrote:

> Wow, top service ;) Thanks, Sean.
>
> Mark
>
> Sean Cribbs wrote:
>  
>> Mark,
>>
>> It should obviously be doing that for you!  My apologies.  Let me patch
>> in something real quick.
>>
>> Sean
>>
>> Mark Gallop wrote:
>>  
>>    
>>> Hi all,
>>>
>>> I have the scheduler extension installed and use the following code in a
>>> layout:
>>>
>>> <r:find url="/news-and-events">
>>> <r:children:each limit="5" order="desc" by="published_at">
>>> <div class="entry">
>>>   <h3><r:link /></h3>
>>>   <p class="info">Posted <r:date format="%b %d, %Y" /></p>
>>> </div>
>>> </r:children:each>
>>> </r:find>
>>>
>>> Now this is showing links to pages which have expired as r:children:each
>>> ignores the expires_on value for the page.
>>>
>>> I wonder if anyone can advise whether I would need to create my own tag
>>> to filter the children, or is it already possible to exclude expired
>>> pages using existing tags?
>>>
>>> Cheers,
>>> Mark
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:   Radiant@...
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>>>  
>>>    
>>>      
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@...
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>  
>>    
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@...
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>  

_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: scheduler extension + r:children:each

by Mark Gallop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

DB-agnostic, too. Thanks! I had needed to change the query to work with
a ms sql server.

Can you think of a good way to include expired content? I am using the
expiry date on news items but I would also like to have an archive of
old news. What do you think of having an "archive after expire" field in
the scheduler extension? Then I could do something like:

<r:children:each limit="5" order="desc" by="published_at" include_archived="true">

Any suggestions?

Cheers,
Mark

Sean Cribbs wrote:

> http://dev.radiantcms.org/radiant/changeset/740
>
> Cheers,
>
> Sean
>
> Mark Gallop wrote:
>  
>> Wow, top service ;) Thanks, Sean.
>>
>> Mark
>>
>> Sean Cribbs wrote:
>>  
>>    
>>> Mark,
>>>
>>> It should obviously be doing that for you!  My apologies.  Let me patch
>>> in something real quick.
>>>
>>> Sean
>>>
>>> Mark Gallop wrote:
>>>  
>>>    
>>>      
>>>> Hi all,
>>>>
>>>> I have the scheduler extension installed and use the following code in a
>>>> layout:
>>>>
>>>> <r:find url="/news-and-events">
>>>> <r:children:each limit="5" order="desc" by="published_at">
>>>> <div class="entry">
>>>>   <h3><r:link /></h3>
>>>>   <p class="info">Posted <r:date format="%b %d, %Y" /></p>
>>>> </div>
>>>> </r:children:each>
>>>> </r:find>
>>>>
>>>> Now this is showing links to pages which have expired as r:children:each
>>>> ignores the expires_on value for the page.
>>>>
>>>> I wonder if anyone can advise whether I would need to create my own tag
>>>> to filter the children, or is it already possible to exclude expired
>>>> pages using existing tags?
>>>>
>>>> Cheers,
>>>> Mark
>>>> _______________________________________________
>>>> Radiant mailing list
>>>> Post:   Radiant@...
>>>> Search: http://radiantcms.org/mailing-list/search/
>>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>>
>>>>  
>>>>    
>>>>      
>>>>        
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:   Radiant@...
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>>>  
>>>    
>>>      
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@...
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>  
>>    
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@...
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>  

_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: scheduler extension + r:children:each

by Sean Cribbs-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mark,

I think the problem you are trying to solve is different from the intent
of the scheduler extension.  The point of the extension is to make
content disappear completely when it expires.

Sean

Mark Gallop wrote:

> DB-agnostic, too. Thanks! I had needed to change the query to work with
> a ms sql server.
>
> Can you think of a good way to include expired content? I am using the
> expiry date on news items but I would also like to have an archive of
> old news. What do you think of having an "archive after expire" field in
> the scheduler extension? Then I could do something like:
>
> <r:children:each limit="5" order="desc" by="published_at" include_archived="true">
>
> Any suggestions?
>
> Cheers,
> Mark
>
> Sean Cribbs wrote:
>  
>> http://dev.radiantcms.org/radiant/changeset/740
>>
>> Cheers,
>>
>> Sean
>>
>> Mark Gallop wrote:
>>  
>>    
>>> Wow, top service ;) Thanks, Sean.
>>>
>>> Mark
>>>
>>> Sean Cribbs wrote:
>>>  
>>>    
>>>      
>>>> Mark,
>>>>
>>>> It should obviously be doing that for you!  My apologies.  Let me patch
>>>> in something real quick.
>>>>
>>>> Sean
>>>>
>>>> Mark Gallop wrote:
>>>>  
>>>>    
>>>>      
>>>>        
>>>>> Hi all,
>>>>>
>>>>> I have the scheduler extension installed and use the following code in a
>>>>> layout:
>>>>>
>>>>> <r:find url="/news-and-events">
>>>>> <r:children:each limit="5" order="desc" by="published_at">
>>>>> <div class="entry">
>>>>>   <h3><r:link /></h3>
>>>>>   <p class="info">Posted <r:date format="%b %d, %Y" /></p>
>>>>> </div>
>>>>> </r:children:each>
>>>>> </r:find>
>>>>>
>>>>> Now this is showing links to pages which have expired as r:children:each
>>>>> ignores the expires_on value for the page.
>>>>>
>>>>> I wonder if anyone can advise whether I would need to create my own tag
>>>>> to filter the children, or is it already possible to exclude expired
>>>>> pages using existing tags?
>>>>>
>>>>> Cheers,
>>>>> Mark
>>>>> _______________________________________________
>>>>> Radiant mailing list
>>>>> Post:   Radiant@...
>>>>> Search: http://radiantcms.org/mailing-list/search/
>>>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>>>
>>>>>  
>>>>>    
>>>>>      
>>>>>        
>>>>>          
>>>> _______________________________________________
>>>> Radiant mailing list
>>>> Post:   Radiant@...
>>>> Search: http://radiantcms.org/mailing-list/search/
>>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>>
>>>>  
>>>>    
>>>>      
>>>>        
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:   Radiant@...
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>>>  
>>>    
>>>      
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@...
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>  
>>    
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@...
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>  

_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant