1

I create a lightning component that display a custom object : an article, composed with a title, a description and an attachment (an image). I use this component in the community builder and it's working, but I'd like to be able to change the attachment into the community builder, by adding some property in the component. For exemple, now if I want to change the image (attachment) I have to do it in salesforce directly...

Is it possible to add that kind of property in my component ? If yes how can I do it ?

Here is an image that show a component in the community builder and at the right we can see the properties in question : enter image description here

  • is this you looking for implements="force:appHostable, flexipage:availableForAllPageTypes, forceCommunity:availableForAllPageTypes" ? – Ratan Paul Mar 21 '16 at 14:24
  • No I already did that : <aura:component controller="myController" implements="forceCommunity:availableForAllPageTypes"> and I can put my component into a page in the community builder, but I also want to have some property that I can change in the community builder.... if it is possible ! – dou Mar 21 '16 at 14:32
  • you want to set your component attributes values from community builder ? – Ratan Paul Mar 21 '16 at 15:26
  • @sfdcweb I want to set an image as property, and then this image would be displayed in the component – dou Mar 21 '16 at 15:54
  • dou -- image url correct? – Ratan Paul Mar 21 '16 at 16:17
0

Currently you have a single component and you are using that to show all the menus .

Instead your each navigation menu itself will be a component and you will keep the URL configurable in the design file .If you need multiple items you will drag multiple of those components .

The other approach is if you are using queries to pull the results ,create a field at database to allow the app admin to input URL's there

| improve this answer | |
  • I use a query in an apex controller which brings the results I need (title, description and image(attachment) ) but I don't really understand what you propose to do ? – dou Mar 23 '16 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.