Welcome to TalkGraphics.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013
    Location
    Mississippi, USA
    Posts
    184

    Default Using PHP in Xara - Issue with Variants - one works another doesn't

    Ran into another case of variants not playing well with other software. First, it was ecwid ecommerce embedded in Xara. It works fine for one variant but will not work on multiple variants.

    The latest problem is with a couple of PHP scripts I purchased from PHPjabbers; Simple CMS and Blog.

    The Simple CMS offers an option of using php or javascript. No go on the PHP, but the js works great. Two days into testing this and it is everything I wanted from a simple tool to allow clients to do simple updates to a site; change headlines, change text articles, change images, upload files with links... Less than an hour to install, learn to use and integrate into a Xara website. And the price is ridiculous.

    I thought I had figured a workaround for the Blog but the variants came around to bite me in the butt again. The blog requires a line of code as the first line on the page, another line of code as the last line on the page and a line of code in the body. The Xara placeholder works fine for the code in the body. But Xara doesn't allow you to specify placing code in the first and last line of a page. So clever me - I published the site with a .php extension on the "blog" page and simply edited the code for the page on my server. IT WORKS! pretty excited! But here are my two challenges:

    - First - can I tell Xara not to publish a page? I don't want to have to manually edit the blog page code each time I make an update to the rest of the site.

    - Second - my excitement was based on testing on the desktop. But when I go to the mobile version the blog does not display.

    Resolving the first issue only matters it I can resolve the second.

    Are any of you guys geeky enough to read the page source and figure out how to make it work in both variants? Of is this a design issue with how Xara handles variants and can't we worked around?

    THANKS!
    Last edited by onlye; 21 March 2020 at 02:45 PM. Reason: add tags

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,744

    Default Re: Using PHP in Xara - Issue with Variants - one works another doesn't

    Quote Originally Posted by onlye View Post
    The blog requires a line of code as the first line on the page, another line of code as the last line on the page and a line of code in the body. The Xara placeholder works fine for the code in the body. But Xara doesn't allow you to specify placing code in the first and last line of a page.
    First line would go into a Placeholder Head and that Placeholder puts code to the bottom of the HEAD, just before the </HEAD> Tag. The body line would be a Placeholder Body. The last line would be a Page Body code that precedes the </BODY> Tag. There are circuits and bumps to add code to the extreme top of a page but I doubt you need that.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •