[SOLVED]cat list some with link to item view some not

More
10 years 8 months ago #49985 by mdma
Thank you so much!!!!!!!!!!!!!!!!!!!!!!!!!!
will try that out.

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

More
10 years 8 months ago #49988 by ggppdk
Hello

you may post back feedback, with result and/or opinion

Regards


-- 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
10 years 8 months ago #50039 by mdma
sorry iam naked in php-programming, only trial and error method iam capable of:
1.)created select field id=29 1::Yes%% 0::No%% sql:no


2.)changes in a copy of category.items5.php
// routine to determine all used columns for this table
$fld_id_DO_link = 29;
$do_link = @ $items[$i]->fieldvalues[$fld_id_DO_link];

later:

<!-- BOF item title -->
<?php if ($do_link || $do_link===null) : ?>
<a class="fc_item_title" href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->categoryslug, 0, $item)); ?>"><?php echo $item->title; ?>
<?php else : echo $item->title; endif; ?>
<!-- EOF item title -->


wont work (all items linked to itemview)

ps:sorry code button doesnt work in forum editor

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

More
10 years 8 months ago #50043 by ggppdk
Hello

please try
using
$item->..

instead of
$item[$i]->...


also please do a:
Code:
print_r($item->fieldvalues)

to make sure that the variable exists


-- 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
10 years 8 months ago #50062 by mdma
cant crack the nut! i recherched all php variable you gave me, but cant get this switch function to work:

<?php print_r($item->fieldvalues[29]) ?>
Array ( [0] => 1 ) ) for item with enabled field-id 29
Array ( [0] => 0 ) ) other testitem disabled

so looking at your given code i reduce it for myself to:
$do_link = @ $items->fieldvalues[29]; ...ok

<?php if ( $do_link) || $do_link===null) {
echo "do link";
} else {
echo "no link";
}?>
-->always "do link"

tried also:
<?php $do_link = $item->fieldvalues[29];
if($do_link)
{
foreach($do_link as $value)
{
echo $value ;
}
}?>

result
for value yes selected testitem1 =0
for value no selected testitem2=1

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

More
10 years 8 months ago #50064 by ggppdk
Hello

yes,
fieldvalues is an array so you replace:
Code:
$do_link = @ $items[$i]->fieldvalues[29];

with:
Code:
$do_link = @ $items[$i]->fieldvalues[29][0];

notice the [0] at the end


-- 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.334 seconds
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
Save