-
Access attributes in Pages custom fields like label (name), etc
In case someone stumbles on this in the future, here is a way to get the Custom Field name in any database: Remember to replace the <database_id> with the id for your Pages database, so for database ID 21, the code will look like this: \IPS\cms\Fields21::load ... {{foreach $record->customFieldsForDisplay('display_top') as $fieldId => $fieldValue}} {{$field = \IPS\cms\Fields<database_id>::load( $fieldId, ‘field_key' );}} Custom field key: {$fieldId} Label: {$field->_title} Description: {$field->_description} Custom Field Value: {$record->customFieldDisplayByKey($fieldId,'processed')|raw} {{endforeach}}
-
-
Access different parts of an 'address' custom field
The custom field address type embeds different field parts into one field. Is there a way to access the different parts directly? Like the zip/postal code? <!-- how to filter out just the zip code? --> {$record->customFieldDisplayByKey('address','raw')|raw}
-
Access attributes in Pages custom fields like label (name), etc
ooh! This is a great idea. Thanks for offering it. A nice workaround. I'll set up {$label} for the 'listing' type and see what I can do. I wanted to do this in a somewhat automated way, though I could have inserted each field with a custom label in the template code: Label: Programs Data: {$record->customFieldDisplayByKey('programs','processed')|raw} Label: Notes Data: {$record->customFieldDisplayByKey('notes','processed')|raw} But I like your idea much better as we have 30-40 fields. Thank you!
-
Access attributes in Pages custom fields like label (name), etc
Hi there, I posted this at the IPS communities, but I thought it might get a little more direct attention over here. In a Pages DB display template, I can get custom field data with {$record->customFieldDisplayByKey('programs')|raw} And In the Display are of the field, I can set the {$label} and the {$value} as well as use the {$formValue} But what I really need to do is access the custom field's Name (label) and Description from within the Record Display template. Is that possible?Something like: {{foreach $record->customFieldsForDisplay('display_top') as $fieldId => $fieldValue}} custom field key: {$fieldId} // this doesn't exist, does it? {$record->customFieldDisplayByKey($fieldId,'LABEL')|raw} {$record->customFieldDisplayByKey($fieldId,'DESCRIPTION')|raw} // this doesn't exist {{endforeach}} Thanks.
-
[Article] Building a Movies database - using plugin and some styling
The one on the IPS site is the current set of help guides? https://invisioncommunity.com/4guides/welcome/about-invision-community-r7/
-
[Article] Building a Movies database - using plugin and some styling
This is a great guide for customization. Thank you. While I don't use the Movies app (yet?) I can see many ways to use these customizations for other databases/apps as well. Great work. Thanks @Jimi Wikman What is the "IPS Customization database" you mention above? Do you mean your own database, or is it a collection of resources on the IPS site? Mike
-
[Article] How to add database relationsship with design in invision community
Thanks @Jimi Wikman! One thing I didn't understand was how the related data is added to the parent record. With a little experimenting, I figured out that while editing the parent record, in the the related field you start typing the desired search terms and matching related records will appear. Voila! It seems that from the parent record template, one call to the related field calls basicRelationship template which gives us one option to display what fields we want from the child record. So in your example above, I can see how you would use the BasicRelationship_PeopleProfiles to output all the desired PeopleProfile data at one time, like your example, as a card. But what if you want to use only a portion (1 or 2 fields) of the child record in different parts of the parent template? For instance, if your Project was authored by a People Profile record, how could one add a PeopleProfile->Name field at the top of the Project Description, and a PeopleProfile->Bio at the bottom of the Project Description?
-
°sgimc started following Invision Community - building a blog from scratch
-
How did I build this site?
@Jimi Wikman for your custom theme, are you compiling the css using sass/less?
-
-
Tutorial: How to add database relationships in Invision Community
It's a great format. Thank you, excellent tutorial. Can you reference where you learned of all the template constructs like: {$record->customFieldDisplayByKey('your custom field key', 'display')|raw} And you mention there are variations on this - is there a place in the Invision Documentation that describes these?
-
Rebuilding this site for Invision Community 4.5
Thanks for your very open approach to the development of this site. I don't have access to the Strategem page above, and perhaps that is by design, but I am interested in following your process. To answer your Question above, I might start with a listing of the plugins and apps and themes you are currently using and the process to update/modify each component....
-
How did I build this site?
Are you using a purchased base theme, or created/modified a base theme?
-
How did I build this site?
Excellent. Thank you. I wish more site were as open as this about their construction.
sgimc
°Newcomer
-
Last visited
-
Posts
12 -
Reputation
8