[ADDED JSON format to item view in v3.0.9] receive the item via ajax

More
9 years 7 months ago - 9 years 7 months ago #58195 by Miken
How to get ltem via ajax only provide html code without titles?

index.php?option=com_flexicontent&view=item&id=40&tmpl=component

Returns the full html pages without a template site.

How to get a text-only item?

Flexicontent 3.1.1 & Joomla 3.7.1
Last edit: 9 years 7 months ago by ggppdk.

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

More
9 years 7 months ago #58200 by ggppdk
Replied by ggppdk on topic receive the item via ajax
Hello

to get (multiple) items via AJAX, you can use JSON formt and category view URLs and append to them:

&format=json&clayout=emptytemplate

- make sure that you create a copy of "default" template
- and call it "emptytemplate"
- and do not add any fields to it, in any 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
9 years 7 months ago #58220 by Miken
Replied by Miken on topic receive the item via ajax
Something does not work anyway.

To do so:
1. copy template "default" and rename "emptytemplate"
2. I look url in item
Code:
/index.php?option=com_flexicontent&view=item&cid=16:kameliya&id=40:kollektsiya-1&Itemid=126
and add
Code:
/index.php?option=com_flexicontent&view=item&cid=16:kameliya&id=40:kollektsiya-1&Itemid=126&format=json&clayout=emptytemplate

So?

With this url I get an error 404
404 - View not found [name, type, prefix]: item, json, flexicontentView

Flexicontent 3.1.1 & Joomla 3.7.1

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

More
9 years 7 months ago - 9 years 7 months ago #58230 by ggppdk
Replied by ggppdk on topic receive the item via ajax
Hello

yes there is no JSON in item view in v3.0.8
i suggested that you use a category view URL (and retrieve multiple items)

i think simple to add JSON view for item view too, we can add in v3.0.10


-- 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...
Last edit: 9 years 7 months ago by ggppdk.

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

More
9 years 7 months ago #58231 by ggppdk
Replied by ggppdk on topic receive the item via ajax
Hello

we added JSON view to item view for v3.0.9

so in v3.0.9 you can use
...&format=json

for both category and item view
and you will not need to create a new template for neither category view nor item view

and to see a data not as JSON but as PHP arrays / objects do at the browser address:
...&format=json&test=1


-- 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
9 years 7 months ago #58232 by Miken
Replied by Miken on topic receive the item via ajax
Thank you, the future will come in handy. I'm mostly just created view.raw.php in item view

Flexicontent 3.1.1 & Joomla 3.7.1

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

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