0
Welcome Guest! Login
0 items Join Now

Assign dynamic ID for Video particle

  • Assign dynamic ID for Video particle

    Posted 2 months 3 weeks ago
    • I would like to get the ID of a Vimeo video from the URL and assign it to a Video Particle. I'm using a code I have used in the past but I'm not sure if my code is wrong or if this is not possible in Grantry.
      Her is the URL I use for the video particle:
      vimeo.com/ <?php echo $_GET["id"]; ?>

      And this is the structure of my URL:
      mydomain.com/index.php/my-page?id={id-of-the-video }

      Thanks in advance.

      (I'm using Joomla 3.9.19 with Citadel)
    • Last Edit: 2 months 3 weeks ago by Ayyoub Ajmi. Reason: Added Joomla version
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 91575
    • Thanks: 11992
    • Web Designer/Developer

    Re: Assign dynamic ID for Video particle

    Posted 2 months 3 weeks ago
    • You can't write PHP inside a particle. You have to use TWIG or create and external class that can be used in TWIG. http://docs.gantry.org/gantry5/advanced/php-functions .

      Regards, Mark.
    • The following users have thanked you: Ayyoub Ajmi

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.070 seconds