You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Gaurav <ga...@gmail.com> on 2013/12/05 11:12:22 UTC

get blog list form corresponding category

Hello,

I am working on template, in which I want the main blog page to show all 
categories and their corresponding blogs. I am able to get the category 
list but did not understand how, I can get the corresponding blogs list.

There is a macro #showWeblogEntryLinksList($entries) which gives the 
entriesList but did not have any paramater catagory so we can put the 
category and get the blog entry list according to category.

Thanks
Gaurav

Re: get blog list form corresponding category

Posted by Gaurav <ga...@gmail.com>.
Hello Glen,

I found JIRA issue [1] regarding what I was talking in this thread. If 
we are not working on this enhancement, then we can also close that will 
some comments on this issue. Or if you found this can be a improvement 
then I can work on this after ROL-1981.

[1] - https://issues.apache.org/jira/browse/ROL-1252

Thanks
Gaurav

On Friday 13 December 2013 12:50 PM, Gaurav wrote:
> Hello Glen,
>
> Actually, if we can have relations between categories and blog entries 
> then we can easily get the entries and also we can add a ordering 
> column in this for ordering the blog entries in a sensible manner. I 
> am not known about the JPA persistence rules for performance, will 
> this have any performance issues. But this might be a good add to 
> roller if we can order the blogs and categories also (I have seen your 
> mail thread regarding the ordering of categories).
>
> Thanks
> Gaurav
>
> On Friday 13 December 2013 07:56 AM, Glen Mazza wrote:
>> Are you sure that a macro is going to help you?  Even if it were 
>> already available, wouldn't you still want to order the entries under 
>> each category in a sensible fashion? From my own experience 
>> (http://www.jroller.com/gmazza/entry/blog_article_index) -- I would 
>> still want a manual ordering of the blog entries, because there's 
>> little correlation between dates and topics, even under the same 
>> category--look at links 12-13-14, 15-16, 18-19--they make sense to go 
>> together, even though they may have been written months apart with 
>> several other blog articles chronologically between them.
>>
>> That all said, you may not find a smooth solution (i.e., one avoiding 
>> heavy iterations) because of the JPA persistence rules, for 
>> performance/synchonization, whatever, we don't store relations 
>> between categories and blog entries, but primarily just between blogs 
>> and blog entries.
>>
>> Glen
>>
>>
>> On 12/12/2013 08:32 AM, Gaurav wrote:
>>> Hello,
>>>
>>> I am waiting for some reply on this topic ? Is this thing already 
>>> available in Roller or we have to write a new macro for this ?
>>>
>>> Thanks
>>> Gaurav
>>>
>>> On Monday 09 December 2013 01:16:19 PM IST, Gaurav wrote:
>>>> Hello,
>>>>
>>>> Is there any way for this getting blog list from corresponding
>>>> category ? Waiting for some solution to this, although I have done
>>>> this in velocity with some conditions, but its very heavy as too many
>>>> iterations will be there.
>>>>
>>>> Below code will give the entry from that category and different
>>>> unordered list will be print for each category. I think we can include
>>>> this macro in roller, where we can pass the category and get
>>>> respective blogs from that category.
>>>>
>>>> Code:
>>>>
>>>> #foreach($cat in $cats)
>>>>     <ul>
>>>>         #foreach( $entry in $entries )
>>>>             #if($entry.category.name == $cat.name )
>>>>                 <li><a
>>>> href="$url.entry($entry.anchor)">$entry.title</a></li>
>>>>             #end
>>>>         #end
>>>>     </ul>
>>>> #end
>>>>
>>>> Thanks
>>>> Gaurav
>>>>
>>>> On Thursday 05 December 2013 03:42 PM, Gaurav wrote:
>>>>> Hello,
>>>>>
>>>>> I am working on template, in which I want the main blog page to show
>>>>> all categories and their corresponding blogs. I am able to get the
>>>>> category list but did not understand how, I can get the corresponding
>>>>> blogs list.
>>>>>
>>>>> There is a macro #showWeblogEntryLinksList($entries) which gives the
>>>>> entriesList but did not have any paramater catagory so we can put the
>>>>> category and get the blog entry list according to category.
>>>>>
>>>>> Thanks
>>>>> Gaurav
>>>
>>>
>>
>


Re: get blog list form corresponding category

Posted by Gaurav <ga...@gmail.com>.
Hello Glen,

Actually, if we can have relations between categories and blog entries 
then we can easily get the entries and also we can add a ordering column 
in this for ordering the blog entries in a sensible manner. I am not 
known about the JPA persistence rules for performance, will this have 
any performance issues. But this might be a good add to roller if we can 
order the blogs and categories also (I have seen your mail thread 
regarding the ordering of categories).

Thanks
Gaurav

On Friday 13 December 2013 07:56 AM, Glen Mazza wrote:
> Are you sure that a macro is going to help you?  Even if it were 
> already available, wouldn't you still want to order the entries under 
> each category in a sensible fashion?  From my own experience 
> (http://www.jroller.com/gmazza/entry/blog_article_index) -- I would 
> still want a manual ordering of the blog entries, because there's 
> little correlation between dates and topics, even under the same 
> category--look at links 12-13-14, 15-16, 18-19--they make sense to go 
> together, even though they may have been written months apart with 
> several other blog articles chronologically between them.
>
> That all said, you may not find a smooth solution (i.e., one avoiding 
> heavy iterations) because of the JPA persistence rules, for 
> performance/synchonization, whatever, we don't store relations between 
> categories and blog entries, but primarily just between blogs and blog 
> entries.
>
> Glen
>
>
> On 12/12/2013 08:32 AM, Gaurav wrote:
>> Hello,
>>
>> I am waiting for some reply on this topic ? Is this thing already 
>> available in Roller or we have to write a new macro for this ?
>>
>> Thanks
>> Gaurav
>>
>> On Monday 09 December 2013 01:16:19 PM IST, Gaurav wrote:
>>> Hello,
>>>
>>> Is there any way for this getting blog list from corresponding
>>> category ? Waiting for some solution to this, although I have done
>>> this in velocity with some conditions, but its very heavy as too many
>>> iterations will be there.
>>>
>>> Below code will give the entry from that category and different
>>> unordered list will be print for each category. I think we can include
>>> this macro in roller, where we can pass the category and get
>>> respective blogs from that category.
>>>
>>> Code:
>>>
>>> #foreach($cat in $cats)
>>>     <ul>
>>>         #foreach( $entry in $entries )
>>>             #if($entry.category.name == $cat.name )
>>>                 <li><a
>>> href="$url.entry($entry.anchor)">$entry.title</a></li>
>>>             #end
>>>         #end
>>>     </ul>
>>> #end
>>>
>>> Thanks
>>> Gaurav
>>>
>>> On Thursday 05 December 2013 03:42 PM, Gaurav wrote:
>>>> Hello,
>>>>
>>>> I am working on template, in which I want the main blog page to show
>>>> all categories and their corresponding blogs. I am able to get the
>>>> category list but did not understand how, I can get the corresponding
>>>> blogs list.
>>>>
>>>> There is a macro #showWeblogEntryLinksList($entries) which gives the
>>>> entriesList but did not have any paramater catagory so we can put the
>>>> category and get the blog entry list according to category.
>>>>
>>>> Thanks
>>>> Gaurav
>>
>>
>


Re: get blog list form corresponding category

Posted by Glen Mazza <gl...@gmail.com>.
Are you sure that a macro is going to help you?  Even if it were already 
available, wouldn't you still want to order the entries under each 
category in a sensible fashion?  From my own experience 
(http://www.jroller.com/gmazza/entry/blog_article_index) -- I would 
still want a manual ordering of the blog entries, because there's little 
correlation between dates and topics, even under the same category--look 
at links 12-13-14, 15-16, 18-19--they make sense to go together, even 
though they may have been written months apart with several other blog 
articles chronologically between them.

That all said, you may not find a smooth solution (i.e., one avoiding 
heavy iterations) because of the JPA persistence rules, for 
performance/synchonization, whatever, we don't store relations between 
categories and blog entries, but primarily just between blogs and blog 
entries.

Glen


On 12/12/2013 08:32 AM, Gaurav wrote:
> Hello,
>
> I am waiting for some reply on this topic ? Is this thing already 
> available in Roller or we have to write a new macro for this ?
>
> Thanks
> Gaurav
>
> On Monday 09 December 2013 01:16:19 PM IST, Gaurav wrote:
>> Hello,
>>
>> Is there any way for this getting blog list from corresponding
>> category ? Waiting for some solution to this, although I have done
>> this in velocity with some conditions, but its very heavy as too many
>> iterations will be there.
>>
>> Below code will give the entry from that category and different
>> unordered list will be print for each category. I think we can include
>> this macro in roller, where we can pass the category and get
>> respective blogs from that category.
>>
>> Code:
>>
>> #foreach($cat in $cats)
>>     <ul>
>>         #foreach( $entry in $entries )
>>             #if($entry.category.name == $cat.name )
>>                 <li><a
>> href="$url.entry($entry.anchor)">$entry.title</a></li>
>>             #end
>>         #end
>>     </ul>
>> #end
>>
>> Thanks
>> Gaurav
>>
>> On Thursday 05 December 2013 03:42 PM, Gaurav wrote:
>>> Hello,
>>>
>>> I am working on template, in which I want the main blog page to show
>>> all categories and their corresponding blogs. I am able to get the
>>> category list but did not understand how, I can get the corresponding
>>> blogs list.
>>>
>>> There is a macro #showWeblogEntryLinksList($entries) which gives the
>>> entriesList but did not have any paramater catagory so we can put the
>>> category and get the blog entry list according to category.
>>>
>>> Thanks
>>> Gaurav
>
>


Re: get blog list form corresponding category

Posted by Gaurav <ga...@gmail.com>.
Hello,

I am waiting for some reply on this topic ? Is this thing already 
available in Roller or we have to write a new macro for this ?

Thanks
Gaurav

On Monday 09 December 2013 01:16:19 PM IST, Gaurav wrote:
> Hello,
>
> Is there any way for this getting blog list from corresponding
> category ? Waiting for some solution to this, although I have done
> this in velocity with some conditions, but its very heavy as too many
> iterations will be there.
>
> Below code will give the entry from that category and different
> unordered list will be print for each category. I think we can include
> this macro in roller, where we can pass the category and get
> respective blogs from that category.
>
> Code:
>
> #foreach($cat in $cats)
>     <ul>
>         #foreach( $entry in $entries )
>             #if($entry.category.name == $cat.name )
>                 <li><a
> href="$url.entry($entry.anchor)">$entry.title</a></li>
>             #end
>         #end
>     </ul>
> #end
>
> Thanks
> Gaurav
>
> On Thursday 05 December 2013 03:42 PM, Gaurav wrote:
>> Hello,
>>
>> I am working on template, in which I want the main blog page to show
>> all categories and their corresponding blogs. I am able to get the
>> category list but did not understand how, I can get the corresponding
>> blogs list.
>>
>> There is a macro #showWeblogEntryLinksList($entries) which gives the
>> entriesList but did not have any paramater catagory so we can put the
>> category and get the blog entry list according to category.
>>
>> Thanks
>> Gaurav



Re: get blog list form corresponding category

Posted by Gaurav <ga...@gmail.com>.
Hello,

Is there any way for this getting blog list from corresponding category 
? Waiting for some solution to this, although I have done this in 
velocity with some conditions, but its very heavy as too many iterations 
will be there.

Below code will give the entry from that category and different 
unordered list will be print for each category. I think we can include 
this macro in roller, where we can pass the category and get respective 
blogs from that category.

Code:

#foreach($cat in $cats)
     <ul>
         #foreach( $entry in $entries )
             #if($entry.category.name == $cat.name )
                 <li><a 
href="$url.entry($entry.anchor)">$entry.title</a></li>
             #end
         #end
     </ul>
#end

Thanks
Gaurav

On Thursday 05 December 2013 03:42 PM, Gaurav wrote:
> Hello,
>
> I am working on template, in which I want the main blog page to show 
> all categories and their corresponding blogs. I am able to get the 
> category list but did not understand how, I can get the corresponding 
> blogs list.
>
> There is a macro #showWeblogEntryLinksList($entries) which gives the 
> entriesList but did not have any paramater catagory so we can put the 
> category and get the blog entry list according to category.
>
> Thanks
> Gaurav