modify category_items.php on template

More
12 years 3 months ago #27148 by blade3
I create a new template (duplicate blog template) And i would like to access inside category_items.php to
item positions and field inside the position..
I know to access item position inside item.php is like:
Code:
<?php if (isset($item->positions['title'])) : ?> <?php foreach ($this->item->positions['title'] as $field) : ?>

and inside the category_items we use:
Code:
$items[$i]->title

to get title.. but not all field inside the title position..


Any idea ?

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

More
12 years 3 months ago #27152 by ggppdk
Inside the 'title' position are only the fields that you have added in title position of the category layout of the 'blog' template.

Goto template manager and check which fields you have added in the title position


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 3 months ago #27180 by blade3
thanks to reply :-)

When I duplicate my blog template.. I've changed some position and now the title position is not only for the title..

On the category layout, I've no field inside.. and I've create items layout with few custom field but in the category_items.. i want the same items layout.

With all items but the max length "description" 200...

when we list all items using leadblock and introblock...

I just want to extract all field for "X" position like we can do inside the items.php

thanks :-)

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

More
12 years 3 months ago #27200 by ggppdk
This gives you the fields of position 'X' for item no $i

$items[$i]->positions;

Or you need the field names entered in position 'X'?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 3 months ago #27201 by blade3

ggppdk wrote: This gives you the fields of position 'X' for item no $i

$items[$i]->positions;

Or you need the field names entered in position 'X'?


if I understand,
I can:
Code:
<?php if (isset($items[$i]->positions['x'])) : ?> <?php foreach ($items[$i]->positions['x'] as $field) : ?>

??

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

More
12 years 3 months ago #27204 by ggppdk
mmm, yes the code is already present inside the template file


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.402 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