21309 Posts in 5738 Topics by 2603 members
Page: 1 2
|Go to End||Next >|
14 September 2011 at 12:37am
i think the headline is very confusing
So let me explain you what i mean/want
I've got two Pagetypes
1. ReferencePage -> containing a Headline($RefHeadline), Previewimage($RefPreview) and some Text($RefContent)
There's one ReferencePage for each Reference
2. ServicesPage -> containing 10 different tabs in the Admincenter with the different Services.
There's one ServicesPage for all Services
Ok, I thought about adding a method to each service tab to select one or multiple ReferencePages and import the variables $RefHeadline and $RefPreview to the chosen tab and finally showing the output of the ReferencePage variables on ServicesPage under the before chosen tab.
The intent is, adding work examples to the belonging service.
Can someone help me build this?
14 September 2011 at 1:09am
I think I checkd what you mean
You build a homepage for webagency which offers 10 services and for each service you can have x references?
If so it would be better to also create one ServicePage for each Service and then work with relations.
A ServicePage has_many References and a Reference has_one Service.
14 September 2011 at 7:32pm
Sry i forgot to say, that I want to do that with out changing the ... ähmm ... type of service pagetype? I don't won't each service to be a single page.
Is that possible?
14 September 2011 at 9:06pm
there are always ways to do it ... but much more difficult.
10 tabs in backend does not mean that you can also have a relation to references for each service.
can you post your model config (DB) fields of both page types?
16 September 2011 at 8:30am
and? some ideas?
22 September 2011 at 1:02am
Helloooooo ;) ?
22 September 2011 at 3:18am
It's not that nobody wants to help you really - it's just that it isn't all that easy, the way you want to do it
The difficulty lies in the fact that you need to set up 10 separate relations to sets of ReferencePages for your 10 tabs, and SilverStripe doesn't support multiple has_many/many_many relations to one and the same object all that well. An alternative might be using three objects like this:
- A ReferencePage
- A Service object that has_many ReferencePages (new)
- A ServicePage that has_many Services
Now you could use somethin like a ComplexTableField on your ServicePage to create the services.
Next you could either use a Service dropdown on your ReferencePages to link each ReferencePage to a Service (the easy way) Or you could create a multi-select kind of field on your Service-popup to link a set of ReferencePages to the Service (the hard way).
Page: 1 2
|Go to Top||Next >|