JSON output / Raw output templates

More
12 years 7 months ago #38858 by brandonking
Hello, rubenreyes

Can you plz explain about this template?
When do we use it? :oops:

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

More
12 years 7 months ago #38876 by rubenreyes
Hello brandonking

We are currently developing a mobile app for a client. Part of the app functionality is a location search. In order to keep the list of locations and their info up to date in the app we wanted a mechanism for the app to read the information that is already contained in Flexicontent category and items.

So, we thought it would be interesting if I could just point to the category URL and get a JSON or JSONP response that nicely exported the some parameters of the category, and each item.

With this Flexicontent template, and the Joomla raw.php template we were able to achieve that as described in previous posts.

Ruben

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

More
12 years 3 months ago #42359 by gauthier
I have exactly the same request. I have to prepare a json structure to export data for an app.

I am not understanding the raw.php role.

Could you explain it?

Thanks

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

More
12 years 3 months ago #42361 by rubenreyes
You need to place the file raw.php in your JOOMLA template. This is what will prevent your output to include any HTML and be only a raw text output.

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

More
12 years 2 months ago #42942 by igcorreia
Is this is the CORE of flexi?

if no do you know why?

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

More
11 years 5 months ago #49433 by horsey
Hello, I have to deliver custom XML output for categories for an existing mobile app as well. I followed this example, but can't get it together.

Is the syntax still valid like this for FC 2.2.0 r1932 ?

Cheers

ETA:

When I remove
Code:
<?php ob_start(); // Form for (a) Text search, Field Filters, Alpha-Index, Items Total Statistics, Selectors(e.g. per page, orderby) // If customizing via CSS rules or JS scripts is not enough, then please copy the following file here to customize the HTML too include(JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'tmpl_common'.DS.'listings_filter_form.php'); $filter_form_html = trim(ob_get_contents()); ob_end_clean(); if ( $filter_form_html ) { echo '<div class="group">'."\n".$filter_form_html."\n".'</div>'; } ?>

In category_items.php I get a blank page in return.

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

More
11 years 5 months ago #49435 by horsey
Think I'm a step closer...

Just let
Code:
<?php ob_start();?>

and it works ...

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

Moderators: vistamediajoomlacornerggppdk
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