Two areas different content

Questions, Tips & Tricks, HowTo's, ...
Post Reply
axe1987
Posts: 51
Joined: Wed Dec 17, 2014 11:35 am

Two areas different content

Post by axe1987 » Thu Jan 22, 2015 3:33 pm

Hi,

i'm working on an event module.
My problem is that i get the same content, when i insert a second area of the same kind on the same page.

Here a little bit about the module.
I create a new event object (class is selfmade) for every event. I organize the events in the backend (via folders).
Then i can drag an folder on a href editable in the edit view of my page. The folder gets processed via the action.php and every Object within the folder is passed to the view again.

Imagine this now:
I have a eventList A (Events in January) and another B (Events in February).
I drag different folders onto list A and B, but i have the same content in both.
I guess it's related to the fact that they share the same view.

Any Ideas??ß

Greets axe
Still learning...handle with care ;)

User avatar
IgorBenko
Posts: 689
Joined: Thu Jul 21, 2011 4:33 pm
Location: Berlin
Contact:

Re: Two areas different content

Post by IgorBenko » Thu Jan 22, 2015 3:44 pm

I never encountered such problems with areas. Can you maybe show action.php? How are you retrieving the value of href editable in action.php?

I am not sure but I think the areas don't share views - they each have their own view with their own scope. I might be wrong - must check...

Try first just echoing the path of the href and try to see if they are the same or not.

Code: Select all

<?= $this->href("objectsFolder")->getFullPath(); ?>


Cheers, Igor
basilicom GmbH - Official Pimcore Selected Company - http://basilicom.de/de/pimcore

axe1987
Posts: 51
Joined: Wed Dec 17, 2014 11:35 am

Re: Two areas different content

Post by axe1987 » Thu Jan 22, 2015 4:01 pm

Another funny thing happend.
I tried your suggestion and inserted your fullPath line.
The output only appeared in one of the area blocks.
Then i tried putting a different area block between the two I'm having trouble with.
Now i get a new error message, which I have no clue how :)
The error says that I call the undefined function getBegin() (from my event modul) BUT the error is thrown inside the classmap file of a different Module (the on I inserted).
" Exception: Call to undefined method getBegin in class News_Object_NewsItem "

I'm guessing something else could be wrong with our templating module. That inserts different amounts of rows (2 rows, three and different sizes).
I'll have to look into those too I guess.

But any Ideas ya might have would be appreaciated :)

But if ya wanne help me anyway, i got another post related to the module ;)
viewtopic.php?f=24&t=2152#p8356

Greets Axe
Still learning...handle with care ;)

User avatar
IgorBenko
Posts: 689
Joined: Thu Jul 21, 2011 4:33 pm
Location: Berlin
Contact:

Re: Two areas different content

Post by IgorBenko » Thu Jan 22, 2015 4:11 pm

Sorry, without seeing any source code it's hard to give more suggestions...

But I will try to answer your other post :)

Cheers, Igor
basilicom GmbH - Official Pimcore Selected Company - http://basilicom.de/de/pimcore

axe1987
Posts: 51
Joined: Wed Dec 17, 2014 11:35 am

Re: Two areas different content

Post by axe1987 » Thu Jan 22, 2015 4:57 pm

Found the problem.
I'm using bootstrap modals to put the editable inside a popup box.
After deactivating that it works again.

it seems that the open options button opens the same options field each time. Not one specific for each area.

will keep ya up to date on this.
Still learning...handle with care ;)

axe1987
Posts: 51
Joined: Wed Dec 17, 2014 11:35 am

Re: Two areas different content

Post by axe1987 » Thu Jan 22, 2015 5:09 pm

solved it..
my popup always called the options popup with the same ID.
Had to create unique popup IDs for every area.

<button data-target="#id">

<div id="id">
<div id="id">
<div id="id">

this was the problem.
now i have different IDs each time :)

Thanks anyway
Still learning...handle with care ;)

User avatar
IgorBenko
Posts: 689
Joined: Thu Jul 21, 2011 4:33 pm
Location: Berlin
Contact:

Re: Two areas different content

Post by IgorBenko » Thu Jan 22, 2015 5:12 pm

OK, I'm glad you found the problem.

Cheers
basilicom GmbH - Official Pimcore Selected Company - http://basilicom.de/de/pimcore

Post Reply

Return to “Document Area-Brick Development”



Who is online

Users browsing this forum: No registered users and 1 guest