- This topic is empty.
January 23, 2015 at 11:21 am #194106bearheadParticipant
Hey, this isn’t a js question per se, so I put it in this forum.
It is kind of convoluted, but the benefit is that if my boss wants something changed that requires editing html, I only need to do it once to the template document and not 300 times to each project file.
$(".quote").load("project_data.html #quote");in php I could use?
here is an example project so you can see what I have going on: http://www.aeieng.com/new_aei/project1/January 23, 2015 at 5:54 pm #194122ShikkedielParticipant
This answer on Stackoverflow looks like a php alternative :
What I need to do is take the content from specific divs on one document, and then insert it into other specific divs in another document.
The answer Shikkediel gave was specifically stated to be a PHP alternative which is designed to use templates like that.
It’s gotta be a much better option that this “cloning” or “cut and pasting”.January 27, 2015 at 8:46 am #194345ShikkedielParticipant
If the original HTML files should be kept as they are, it’s probably preferable to use
file_get_contentsso the data can be ‘hacked up’. To be able to discern the elements from each other, we come into an area I know little about – one would need a regex or parser library.
Were the job up to me, I’d make smaller templates of the original files and insert them separately into the document – with the
includewith echoed HTML even.
Edit – also in response to nkrisc, I think this is a basic CMS of sorts…
- The forum ‘Other’ is closed to new topics and replies.