Set different Item layouts in kategory Blog strukture ?

More
13 years 10 months ago #8074 by earlybird
Hi together,
I'am just starting to work with this really cool Flexy Content Management Plugin and it works really fine for me but my challange is :
to make a Category blog where I can change the Layout of every item (i.e. setting the background-color)

I thougth to realize this by attaching the right template to the Itemtype but if I display a category Blog it displays only the item-template of the category blog template for each item...

Has someone an Idea if there is a possibilty to change the template of each element in a category blog structure ?

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

More
13 years 10 months ago #8116 by micker
hello on each item you can affect one template (item template)
create on template for you category veiw and many template for you item view
affect your template for item only (right colone)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
13 years 10 months ago #8126 by earlybird
Ok thanks for the fast answer, but is it Possible to have more than one Template affecting the Items in one category view ?
(as far as I can see, category_items.php determines, how all items should look like in this category view)

what I think of is, to load for each item in the category view his own Item template. So that all Items in the category view have its own template.

in the category.php there is this line of code which loads category_items.php :
Code:
<?php echo $this->loadTemplate('items'); ?>
maybe there is an equal posibility to load a concrete template for each item in the category_items.php
somthing like:
Code:
<?php echo $this->item->loadTemplate(); ?>
which depends on Template settings in the concrete Item (right column) or
on the Template Settings of the itemtype.

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

More
13 years 10 months ago #8132 by micker
hello i am a programmer but i have an idea
creat a number field ou liste (1-2-3-4) for each template number
created your item1.php item2.php ....
and load
Code:
<?php echo $this->loadTemplate('items'); ?>
and insert the number in fact (i didn't have the syntax sorry)
<?php echo $this->loadTemplate('items(yournumber)'); ?>
... it's just an idea
Regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
13 years 10 months ago #8268 by earlybird
So, I made an quick and as I think really dirty way to get an own template for each Itemtype in the Blog-view.

I write this for everybody who has the same Problem or maybe someone who could give me a tip resolve this in a more 'Elegant' Way.

First i changed the category_items.php to load his own Template for each Itemtype. I replaced the details for all leadnum as following:
Code:
<?php for ($i=0; $i<$leadnum; $i++) { $this->item = $this->items[$i]; echo $this->loadTemplate('type'.$this->items[$i]->type_id); //It loads an Template named category_type(type_id).php } ?>

than I create the 'Sub'-Templates named : category_type1.php, category_type2.php ...

It would be nice if the names could be category_(typealias).php
but I don't know how to get the typealias ?

I would be really happy if there is a better way to resolve this...

Greetings EB

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

More
13 years 10 months ago #8289 by micker
at first it's a great first solution
thanks for anybody !

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.290 seconds
Save
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