Create your own field positions

Do you have an idea for the Joomla community that you can help implement? Discuss in here.
Forum rules
Global Rules
Posting guidelines for this board <-- please read before posting.

Joomla Idea Pool <-- Add your suggestions for future versions of Joomla and vote on current suggestions.
Locked
Mr. Wimpy
Joomla! Explorer
Joomla! Explorer
Posts: 289
Joined: Fri Dec 02, 2005 10:46 am
Location: The Netherlands

Create your own field positions

Post by Mr. Wimpy » Fri Jun 02, 2017 3:18 pm

Hey,

Currently there are three default options where you can display the fields: below the title, above the content and below the content. What if you want to display the fields somewhere else?

Well, you need an override with a snippet of code to display a specific field. If you have many fields, or want to add some later you need to edit the override again.

It would be cool if you could create field positions similar to module positions.
You would still need overrides, but the new field position can be reused.

Code: Select all

<jdoc:include type="fields" name="on the side" />
You also add the field position to the templateDetails.xml like with module positions.

Now in the field edit screen at Automatic display you get an extra option "on the side".

Regards,
Wim

User avatar
websitedons
I've been banned!
Posts: 389
Joined: Sat May 27, 2017 9:42 am

Re: Create your own field positions

Post by websitedons » Fri Jun 02, 2017 7:25 pm

There is an accompanying core content plugin that allows field inserting to article posts

{field 1} will display the field with the ID 1
{field 1,foo} will display the selected field using the alternative layout 'foo'.
{fieldgroup 2} will display all fields within the fieldgroup with the ID 2


You can possibly (haven't tried it) achieve your desire by placing those shortcodes in a custom module and then assign to your module position.

There is also a third party plugin that allows global article and category configuration and provides maximum flexibility with custom fields positioning, along with other data element placement, with the use of shortcodes.

See these varied layouts created by the plugin
[img]***%20URL%20Removed%20***[/img]

[img]***%20URL%20Removed%20***[/img]
Last edited by imanickam on Fri Jun 09, 2017 4:09 pm, edited 1 time in total.
Reason: URL Removed for self promotion. Please do not repeat this in the future.

Mr. Wimpy
Joomla! Explorer
Joomla! Explorer
Posts: 289
Joined: Fri Dec 02, 2005 10:46 am
Location: The Netherlands

Re: Create your own field positions

Post by Mr. Wimpy » Sat Jun 03, 2017 8:15 am

Hey websitedons,

I know of the { } shortcodes and I know how to add fields to pages with php.

What I suggested is the ability to add extra, custom, options in the Automatic display dropdown to display fields.

User avatar
websitedons
I've been banned!
Posts: 389
Joined: Sat May 27, 2017 9:42 am

Re: Create your own field positions

Post by websitedons » Tue Jun 06, 2017 8:34 pm

Mr. Wimpy wrote: What I suggested is the ability to add extra, custom, options in the Automatic display dropdown to display fields.
It would be quite cluttering to add a function to display fields as modules do, since the method already exists to achieve such a result, simply by rendering the field shortcode in a custom module. In fact, it would be simpler to develop a module that sources the custom fields DB and present them as a selectable drop list.


Locked

Return to “Joomla! Ideas Forum”