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

Argus’s picture

Could you give a bit more info? Is adres a custom content type?

mschuurman’s picture

Yes, 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.

Argus’s picture

This 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 click settings and Content for the Default space display.

mschuurman’s picture

I already thought of that but are not these fiels overwritten by an update ?

Argus’s picture

Yes, 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.

JKingsnorth’s picture

Status: Active » Closed (fixed)

If 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.