display item if custom date is ok [... and performance]

More
12 years 6 months ago #19765 by micker
hello
i do template how diplay only if date serveur is < at custom flexidate
Code:
<ul class="leadingblock"> <?php for ($i=0; $i<$leadnum; $i++) : $enddate = $items[$i]->fields['Dfin']->display; $enddate = new DateTime($enddate); $enddate = $enddate->format('Ymd'); $now = date('Ymd', strtotime('+1 day')); if( $now <= $enddate) : ?> <li> <div style="overflow: hidden;"> <?php if ($this->params->get('show_title', 1)) : ?> <h2 class="contentheading"> <?php if ($this->params->get('link_titles', 0)) : ?> [url=<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug, $items[$i]->categoryslug)); ?>]<?php echo $this->escape($items[$i]->title); ?>[/url] <?php else : echo $this->escape($items[$i]->title); endif; ?> </h2> <?php endif; ?> ....
but with 1.5.6beta2 it doesn't works ...
i check this line
Code:
$enddate = $items[$i]->fields['Dfin']->display;
and it return the same date of now ...
why ?
for performance
do you think it better to use universal module or category ?
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]
Attachments:

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

More
12 years 6 months ago #19768 by micker
first way .... the render performance option ....
if i selected recommended
no filtering and no image description by item
if i selected alway
it work ....

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
12 years 6 months ago #19771 by ggppdk
micker, the html display of field will not be created (=rendered) unless you place them in a template position.

This applies for both item and category layout of the template.

You have 2 alternatives
-- 1. is to change the Global performance option that you changed, (it is ok to do it for item view but for category view it does a lot of damage to performance)
-- 2. is to put the field in the 'renderonly' position, so that its html display is created.


Because of your comment i see we need some more user help about the 'renderonly' position.

I will put this text to help the users:
* about 'renderonly' template position. Here you must place the fields that you output manually in your template e.g. by using for item and category view
$this->item->fields->display
or
$items[$i]->fields->display


-- 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 6 months ago #19776 by micker
great it's works !!
a question
in local dev how to test charging time ?
thanks for help !

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
12 years 6 months ago #19788 by ggppdk
To see the execution time of any component:

You can enable the Debug System, at joomla Global configuration

Then at the bottom of the page you will see times after some joomla events:

Application afterLoad: 0.001 seconds, 0.53 MB
Application afterInitialise: 0.164 seconds, 6.38 MB
Application afterRoute: 0.247 seconds, 9.81 MB
Application afterDispatch: 1.948 seconds, 36.20 MB
Application afterRender: 2.667 seconds, 39.08 MB

The component execution time is (almost):
afterDispatch - afterRoute

The total joomla page execution time is (almost):
afterRender

Then you have:
-- Time to get request to server (small)
-- Total joomla page execution time
-- Time to download page (very small for local server)
-- Time for browser to render the html (small)

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.

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