Unversal module : use item->id

More
12 years 7 months ago #19148 by kursus
Hi there,

I'm trying to use items id in the universal menu, but I can't even echo it.

Despite
Code:
<?php echo $this->item->id; ?>

works fine in a standard template, it doesn't work in module templates, neither
Code:
<?php echo $item->id; ?>
Code:
<?php echo $item->id->display; ?>

nor all the combos I've tried.

Is there a way to do this ?

(Flexi 1.5.5)

Thanks a lot

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

More
12 years 7 months ago #19156 by yopyop001
Hi,

No lot of time to find an elegant way (without hacking module code)

For now, in mod_flexiocntent/helper.php, you can add :
Code:
$lists[$ord]['featured'][$i]->id = $row->id;

Before
Code:
$lists[$ord]['featured'][$i]->image = $thumb;

And
Code:
$lists[$ord]['standard'][$i]->id = $row->id;

Before
Code:
$lists[$ord]['standard'][$i]->image = $thumb;

Then call the item->id using
Code:
$item->id

But updating Flexicontent will erase the change...

May be it could be a new parameter of the module

Regards

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

More
12 years 7 months ago #19157 by kursus
Hey,

Thank you for your reply.

I'm gonna try this, however before this can you see an other way to target a specific item in the module ?

Thanks !!

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

More
12 years 7 months ago #19169 by ggppdk
I added it to current development truck, it will be in next beta version of v 1.5.6.

Also i want to note that if you are changing a template of Flexicontent Universal Module, it is better to duplicate it and the change it. Otherwise it will be overwritten when/if you upgrade to a later version.


-- 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.287 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