multiple layouts in article.

felixkat

Senior Member
Is it possible to load two different Fabrik templates within an article?


Something like....


{fabrik view=details id=2 row=1 layout=default_rounded_article}


{fabrik view=details id=3 row=18 layout=default_rounded_details}




What I'm finding is the second form uses the first forms template i.e _article.
 
Argghhh *#$3$#% <-- Insert swear word here!


Spent ages debugging this one, it due to JCE inserting <spans> and other nonsense into my article.


So I propose a change that seems to work around line 150 in plugins\content\fabrik\Fabrik.php.


From

Code:
$match = explode(" ", $match);

To
Code:
$match = explode(" ", strip_tags($match));
 
Seems strange:
with
{fabrik view=details id=11 rowid=2 layout=mint}
{fabrik view=details id=31 rowid=1 layout=bluesky}
I get
error 500,Layout ?mint_row? nicht gefunden!

{fabrik view=details id=11 rowid=2 layout=bluesky}
{fabrik view=details id=31 rowid=1 layout=mint}
is working


playing a bit I with layout names I found
mint,mint ok
then after this mint,bluesky was ok, too
...
it doesn't depend on browser cache:confused:
 
Strange, I tried your first example and that was okay.

Unusual it said 'mint_row' but I too got 500 errors until I change my code as per above.

I only realised the bad formatting when I clicked 'source' on the article and saw it in the raw format.
 
hi

But is it possible to have on the same page, two different layout poinnting on the same table??
i mean :
{fabrik view=details id=11 layout=mint}
{fabrik view=details id=11 layout=bluesky}

because when i do that, only one layout is proposed for both like if i had :

{fabrik view=details id=11 layout=mint}
{fabrik view=details id=11 layout=mint}

best regards

christophe
 
Sorry, I could have sworn I wrote something other than the URL!

Just to say it is logged.... Just a case of getting around to that one. I believe the issue only exists if you want to display the same table id more than once... I could be wrong.
 
mmm... i understand.... but it's not a big problem for FABRIK? because i have a big table of articles and i wanted to display it with two lists :

- one with a template A : Title, autor
- the second view in a right position with only the 5 last titles articles with another specific template....

maybe have you got a issue for that?

best regards
christophe

ps: thank you to have answered so fast !! :) :) :)
 
The only workaround I can think of for the moment is to make a copy of your list.

I think the issue occurs when the List ID is the same, so by copying a list you will have two different list ID's.

I'll try and look at the code at some point as I do actually need to do the same.
 
hi, thank you for your answer... i have created two different list as you said. id=11 and id=12

the page is composed like this : i have an article and a customised module on the right.

the article is made with JCE, i ask my first list in JCE like :
{fabrik view=list id=11 layout=default}


i use a joomla module customised with jce where you can write your code.
i wrote on it :
{fabrik view=list id=12 layout=bluesky show-title=0}

the result is that only the first template is displayed, i mean the id=11 list, and we can see the title too...

note: that i don't understand too, before the updating fabrik, the title was hidded... and befor it, i am sure that i displayed two different template on the same page...

have you got an idea?

best regards
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top