Re: Display a Category as the Content on the Home Page

jlinowes <[email protected]>
Newsgroups gmane.comp.cms.xaraya.user
Organization Xaraya
Message-ID <[email protected]>
oops, paste error, the xar:set should say

<xar:set name="catonly">xarRequestGetVar( 'catonly' )</xar:set>

and the condition should probably be

<xar:if condition="!empty($catonly) and ($catonly ne 1)">


jlinowes wrote:
> Hi Wayne,
> 
> There are a number of different ways to do this.
> 
> You can put the cat nav tag in any template, including your homepage 
> one, for example,
> 
>     <xar:categories-navigation layout="trails" showchildren="1" 
> module="articles" itemtype="15" catid="46" showcatcount="0" 
> showempty="1" />
> 
> where 15 should be replaced with the actual pubtype id of "products", 
> and 46 is the root category.
> 
> 
> Another idea is to re-use the template that works already, and pass the 
> page a parameter telling it to omit certain content.
> 
> For example, if you used the link
> http://mysite.com/index.php/products/c46/?catonly=1
> 
> Then in the template you could add
> 
> <xar:set name="catonly">$value = xarRequestGetVar( 'catonly' )</xar:set>
>     <xar:categories-navigation layout="trails" showchildren="1" 
> module="articles" itemtype="$ptid" catid="$catid" 
> showcatcount="$showcatcount" showempty="1" />
> 
> ... some content you show in all cases ...
> 
> <xar:if condition="$catonly ne 1">
>     ... all other content...
> </xar:if>
> 
> 
> Then in your home page you can add
> 
> #xarModFunc('articles','user','view',array('ptid'=>15, 'cid'=>'46', 
> 'catonly'=>'1'))#
> 
> 
> hope this helps,
> linoj
> 
> 
> wwalkerbout wrote:
>> Hi,
>>
>> This is a follow-up on my message from two days ago, as I am still 
>> stumped on this issue. Does anyone have any suggestions on how to 
>> handle this situation?  My understanding of the Xaraya Blocklayout or 
>> API calls is a matter of confusion, to say the least, so I am going 
>> around in circles here. This is the last thing I need to get working 
>> before I can show my friend their "draft" site.
>>
>> In clarification, I have formated a page that displays all of the 
>> items in a Category with associated thumbnal images. If I select that 
>> category, everything displays just fine. The work in pulling together 
>> my page of Category items and images (which I added in the Category 
>> Tree),  and in formating them, I did through my 
>> /themes/devtest/\modules/categories/user-navigation-trails.xt template 
>> file.
>>
>> The URL in my dev environment is:
>>
>> http://local.devtest/index.php/products/c46/
>>
>> Now, what I need to do is to display that exact list of categori items 
>> and images in my Frontpage Article pubtype, with other content above 
>> and below. I have been working on that in my Frontpage Articles 
>> template and the remainder of the Frontpage is displaying fine. It is 
>> the category item list and images that I can't get to display.
>>
>> In my ignorance, I have been playing with the following, but without 
>> success:
>>
>> 1.    Using the Window Module to hold the content (seemed to need a 
>> link to activate).
>> 2.    <xar:module... call. I know how to use that to call an Article, 
>> but I gather I should be calling a Category here.
>> 3.    xarModAPIFunc(... call. Totally out of my league here. I didn't 
>> know what I was doing.
>> 4.    <xar:module id=... call. Just clutching at straws here.
>>
>> So I am probably trying all the wrong things here.
>>
>> Therefore, I would truely appreciate any feedback on how I might get 
>> this Category list to display where I need it, on my Home Page.
>>
>> Cheers,
>>
>>
>> Wayne
>>
>> "wwalkerbout" <[email protected]> wrote in message 
>> news:[email protected]...
>>> Hi,
>>>
>>> I have a category displaying a set of Category Images (2 rows of 4 
>>> images), which i would like to be the main content on the Home Page 
>>> (with additional content above and below it).
>>>
>>> Does anyone know the best way to have a Category displayed as content 
>>> on the Home Page?
>>>
>>> Cheers,
>>>
>>>
>>> Wayne
>>>
>>
>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.