Forums

Phocagallery plugin

FloB 01 Feb, 2024
Hello,

I need to display phocagallery plugin in a CF v7 form.
In an html code, with run joomla plugin enabled, the following litteral code is working :
{phocagallery view=category|categoryid=1030}

However, what I need is to retrieve the category id with a read database (I'm ok with this), and put it in the plugin code.
{var:rd_infos.sortie.phocacat_id}
returns 1030, but
{phocagallery view=category|categoryid={var:rd_infos.sortie.phocacat_id}}
is not working (returns a "}").
{var:photos}
returns the plugin code with the catid but is not "transformed" when put in html code

Which syntax should I use please ?

Html code in backend :
<p>{phocagallery view=category|categoryid=1030}</p>
<p>hello</p>
<p>{phocagallery view=category|categoryid={var:rd_infos.sortie.phocacat_id}}</p>
<p>hello</p>
<p>{var:photos}</p>


Result :
Max_admin 01 Feb, 2024
maybe the closing brackets here break the syntax:
phocacat_id}}</p>

try to use PHP code to output this line:

echo "{phocagallery view=category|categoryid=".$this->get("rd_infos.sortie.phocacat_id")."}";
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
FloB 01 Feb, 2024
Hi Max,

Thanks for your quick answer.
Weird, I've got an error
0 - syntax error, unexpected 'phocagallery' (T_STRING), expecting ';' or ','

I put your code between php brakets and add the run php option in the html code
FloB 02 Feb, 2024
Hello,
I tried to change { and } by chr(123) and chr(125), but the text is not interpreted as a plugin (idem if I use a php function and call it as {var:}).

I also tried with chronoconnectivity plugin :
    php function which returns "{chronoconnectivity6}".$this->data('nom')."{/chronoconnectivity6}" displayed in an html => text is not interpreted as a plugin and displayed as text

    using {data:} : {chronoconnectivity6}{data:nom}{/chronoconnectivity6} => returns

<div class="ui message g2-message error"><ul class="list header"><li>Error, connection does not exist or is not published.</li></ul></div>
You need to login to be able to post a reply.