Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: AJAX powered portfolio
It looks like it would! Though I’m not sure how to go about using it. Would this preserve clean URL’s or is it jankier than that?
Offline
Re: AJAX powered portfolio
this is untested but create the tag you want to parse in txp>presentation>forms. Name the form rah_eo_something
. Insert some php in your external js by using <?php echo file_get_contents('http://www.yoursirte.tld/?rah_external_output=something'); ?>
I’m not sure if documents with js extension can parse php but you can try it as I don’t think that it will blow up your server:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: AJAX powered portfolio
th3lonius wrote #280006:
I don’t want to get in to the habit of inserting javascript in to HTML.
You don’t have to insert the whole js block into your form, just this
<script>
var hash = '<txp:some_tag />';
</script>
and then call hash
js variable in your external js file.
I did try this method however and I can’t get it to work. … So how do I use the jQuery .load() function to extract data from an article in the txp database?
Stricto sensu, .load()
doesn’t extract data from db, but from an html page. If you decide to use txp, you should convert all these guggenheim.php
pages into txp articles, inside some portfolio
section. Then (in section/article
url mode) their valid url will be .../portfolio/guggenheim
, that you can access normally, even without js. No hash extraction is needed anymore, but you’ll have to create a page
form that preserves the structure (#content-cont
, #viewport
, etc) of the static site. You will also have to populate #work-grid
and so on with txp tags.
Now, you could also just tweak a little the static site, without txp, to be able to use clean links, following these lines.
Offline