FlexiContent from SVN

More
13 years 10 months ago #17992 by ggppdk
Replied by ggppdk on topic FlexiContent from SVN
Your template is "accueil" and it is not the the templates table, further more you don't have custom fields in any position even for the default template

You said the output is this

folder: accueil, type: items
Quering field in positions...


so you tried to display the item using template "accueil"


-- 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...
The topic has been locked.
More
13 years 10 months ago #17993 by kursus
Replied by kursus on topic FlexiContent from SVN
Here is the sql table from my working 1.5.5 version.

It is exactly the same, and the fields are perfectly displayed. I guess this table is not the only link to templates in the system, because in the backend my templates are perfectly linked.

When replacing the getFieldsByPositions function in my working 1.5.5 version I still got the

folder: accueil, type: items
Quering field in positions...

despite fields are correctly displayed.

Once again my custom templates only contain 1 file (item.php), so maybe it's because of this, even though it didn't prevent the whole thing to work so far.
Attachments:
The topic has been locked.
More
13 years 10 months ago #17994 by kursus
Replied by kursus on topic FlexiContent from SVN
I PMed you the 1.5.5 site so can can check it out by yourself.

Thank you
The topic has been locked.
More
13 years 10 months ago #17995 by ggppdk
Replied by ggppdk on topic FlexiContent from SVN
Ok i will look at this.


-- 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...
The topic has been locked.
More
13 years 10 months ago #17997 by ggppdk
Replied by ggppdk on topic FlexiContent from SVN
I have look at your backup you sent the reason fields do not appear is because you DO NOT have them assigned to any position of your custom template.

I had asked you to check this, i thought you have done it:

The custom fields did not appear on the default because you have not assigned them to the default's template item view ?


The new code will only create fields if you have them assigned to some template position.

Even if you don't use these specific template position and you are outputting them completely manually (which is what you do), you still need to assign the fields to any template position so that the code will know that you need them. This way the needed fields will be created !!!

Please assign fields you need to display to some position e.g. if you need 3 fields for template 'accueil', assign all 3 of them to position title for the item view of template 'accueil'.

You can use fields without assigning them to any position,
if before doing an 'echo' on them you can function getFieldDisplay(), place this :
Code:
FlexicontentFields::getFieldDisplay($this->item,'myfieldname1');
before every statement:
Code:
echo $this->fields['myfieldname1']->display;

The code you uncommented will create all item fields regardless of if they are used or not.

Imagine having a category view with a 100 items, creating all fields of them and running content plugins on all of them it will take 20-30 seconds for the page to be created. In the item view the effect is very 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...
The topic has been locked.
More
13 years 10 months ago #18014 by kursus
Replied by kursus on topic FlexiContent from SVN
Sorry I thought when you said

because you have not assigned them to the default's template item view

you meant "manually adding the field in the template", that's why I answered "I added it to the code".

I've never used default templates, positions or drag'n'drop or whatsoever. I though it was just a helper for non developpers and really didn't know it has something to do with the system. My mistake.

It leaves me with a couple of questions :

I still don't get the point of this way of doing, ergonomically and technically speaking.
I mean you create a field, link it to a type, link the type to a template, link the template to a content, and finally link the content to a Joomla menu item. Shouldn't the system be aware by itself of the fields it is supposed to load (for an item view) ?

For an item view, what's the point in drag'n'dropping a lot of fields in a dummy position ? Can't the system parse item.php file in order to know what is is supposed to load ?
Sounds legit for a category view but not for a item view. When you say "In the item view the effect is very small", don't you mean "the effect is non-existent?"

Thanks anyway and sorry for the wasted time.
The topic has been locked.
Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.329 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