SSL Labs ScoreSecurityHeaders.io Score

Log in to participate

There is no cost to join RicheyWeb, and membership is a requirement to submit bug reports and participate in the support forums.

× Extension Discussions

Subform + Article Fields

More
1 month 4 weeks ago - 1 month 4 weeks ago #2827 by webhelpus
webhelpus created the topic: Subform + Article Fields
Can you use Regular Labs Articles Field" with Subforms? I do a podcast of Old Time Radio shows and list the characters with the actors' names. Right now it's a repeatable field with two text fields. In the Actors name field, I use Regular Labs' snippets to create a link to the page. Unfortunately, Joomla's repeatable fields (as we all know) is limited to what fields I can use.

How easy would it be to have 2 fields, one Character name and the other Actor Name (this field would link to the Article about the actor) in the format:

The Shadow - Orson Welles
Last Edit: 1 month 4 weeks ago by webhelpus.

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

More
4 weeks 22 hours ago #3763 by michael
michael replied the topic: Subform + Article Fields
Joomla field plugins aren't like regular Joomla fields. Fields like the "text" and "sql" field types are defined within Joomla and are available globally.

Field plugins are only available to components that have implemented custom fields.

However..... (this is the best part)

Joomla has a field, which is accessible to subform plugin, which can be used to select articles - but there's a catch (I'll get there in a minute)

Here's the field definition to use in your subform XML:
<field 
	type="modal_article" 
	name="article" 
	addfieldpath="/administrator/components/com_content/models/fields" 
	label="Writeup Article" 
	description="Select an article" 
	select="true" 
	new="true" 
	edit="true" 
	clear="true" 
	filter="integer" 
/>

Here's the catch: If you use it in a repeatable subform, you must save the article before the article selection buttons work. Not a show stopper, just don't publish until you've saved it and fixed your article links.

Now, mind you - you'll need to create an output template for this subform because the article selection ONLY stores the article ID. You can use JRoute::_('/index.php?option=com_content&catid=XX&id=YY') to get a SEF link to the article within your subform output template.

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Kunena Forum