locked out!
Permalink
Ok, so I entered some php into a php block that was inserted into one of my pages.
The php contained an error which was displayed as the page refreshed.
But now I can't get back into page edit mode. All I get is the red error bar.
There must be a better way to insert page-specific custom php into specific areas of the page....
Does anyone have any words of wisdom?
Thanks
?
The php contained an error which was displayed as the page refreshed.
But now I can't get back into page edit mode. All I get is the red error bar.
There must be a better way to insert page-specific custom php into specific areas of the page....
Does anyone have any words of wisdom?
Thanks
?
OK, I see. So create a block with included php...? And then just drop the bock into the page. This would be a good solution, but the php with the same block needs to be slightly different for each page. I guess I would then have to create a different block for each different page?
Referring back to an older version is a good solution for now.
Thanks
Referring back to an older version is a good solution for now.
Thanks
i dont know what the difference is for every page, but mabye you could handle that with the blocks form ?
or forget about creating a special block, but code it into your theme and use page attributes for the differences...
or forget about creating a special block, but code it into your theme and use page attributes for the differences...
The difference is just the tour code (see below) referred to in the php. All the other fields are exactly the same.
<?php include_once("some_config.php"); $tc = new TourCMS($marketplace_account_id, $api_private_key, 'simplexml'); $tour = tourcode; $result = $tc->show_tour($tour, $channel); $tour = $result->tour;?> <h1><?php echo $tour->tour_name.'';?></h1> <?php $image = $tour->images->image->url.''; echo "<img src='".$image."'/><br />"; echo $tour->tour_name.' - from only '.$tour->from_price_display; echo $tour->exp.''; echo $tour->shortdesc.''; echo $tour->inc.''; echo $tour->ex.'';
Viewing 15 lines of 19 lines. View entire code block.
something like this ?
create a 'tour' attribute for your pages, then in your code:
$c = getCurrentPage();
$tour = $c->getAttribute('tour');
or...create a block for it :D
create a 'tour' attribute for your pages, then in your code:
$c = getCurrentPage();
$tour = $c->getAttribute('tour');
or...create a block for it :D
I'll give it a go.
if you still cant view your page, revert it back to an older version