Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm creating spaces and each space has only one adres.
When i'm in the space i can create an adres with a button create adres.
How can i hide the button when the adres already exists?
Comments
Comment #1
Argus CreditAttribution: Argus commentedCould you give a bit more info? Is adres a custom content type?
Comment #2
mschuurman CreditAttribution: mschuurman commentedYes, Adres is a custom content type.
I'm creating a space e.g. "Rijksmuseum Amsterdam".
When i'm in de space i have a button called create adres.
When i push the button i'm filling in "Museumstraat 1, 1071 XX Amsterdam"
When i return to de space the adres is showing.
What i now want is that the button "create adres" disapears because the adres exists.
Comment #3
Argus CreditAttribution: Argus commentedThis isn't possible without custom code. Open Atrium assumes you could create multiple nodes of the type Adres. Perhaps you can achieve what you want by adding an "adres" field to the Space content type. Then when you edit the Space page you can fill in the adres for that Space.
Mind this also requires adding the field to the panalizer display, you can find it at
admin/structure/types/manage/oa_space/panelizer/page_manager
and then clicksettings
andContent
for the Default space display.Comment #4
mschuurman CreditAttribution: mschuurman commentedI already thought of that but are not these fiels overwritten by an update ?
Comment #5
Argus CreditAttribution: Argus commentedYes, you would have to export the changed Space content type as a Feature to avoid it being overwritten during an update. An other option is to add a custom Content Pane of the type Text and add the adres there. You would have to repeat that for every Space.
Comment #6
JKingsnorth CreditAttribution: JKingsnorth commentedIf each space only needs one address then you could also consider adding 'Address' as a custom field on the Space, rather than using a completely new content type just for it? Then you could tell Panelizer to display this field in the Space template as Argus suggests in #5.
Information about using Features Override to preserve the changes can be found here: https://www.drupal.org/node/2286149
I'm closing this since it is an older issue, but please reopen it if you require further assistance.