Pip Posted August 7, 2020 Posted August 7, 2020 Hi all. Playing around with Processwire and wrapping my brain around the basic stuff. So far so good, until I hit on a field in my page where the output is "InputfieldText" which ought not to be. Let me explain my workspace: The Template I have a template with the following structure: Title Confabulation_Body (Text area) Confabulation_Pseudonym (Text) Output Pages I have two output pages: (1) All pages I created and (2) everyone's pages. All pages I created looks like this: (which is btw the correct output) $newcolors = array() ; $confabulations = $pages->find("template=confabulation, limit=5; created_users_id=$currUser"); foreach ($confabulations as $i) { $newid = intval($i->id) - $basepageid; $newcolors = genColor(); echo "<div class=\"post ". $newcolors[2]. "\" style=\"background-color:#". $newcolors[0] .";\">" . "<a href=\"". $i->url ."\"><div class=\"flap\" style=\"background-color: #". $newcolors[1] ."; color: #". $newcolors[0] ."\">" . $newid ."</div></a>" ."<h2>".$i->title."</h2>".$i->confabulation_body."<div class=\"author\">".$i->confabulation_pseudonym ."</div> <div style=\"clear:both;\"></div></div>"; } While the page to show Everyone's pages : <?php // Echo all posts $newcolors = array() ; $confabulations = $pages->find(" id>1018, template=confabulation, sort=-id, limit=5"); foreach ($confabulations as $i) { $newid = intval($i->id) - $basepageid; $newcolors = genColor(); // $newcolors [0] = background // $newcolors [1] = flap // $newcolors [2] = text echo "<div class=\"post ". $newcolors[2]. "\" style=\"background-color:#". $newcolors[0] .";\">" . "<a href=\"". $i->url ."\"><div class=\"flap\" style=\"background-color: #". $newcolors[1] ."; color: #". $newcolors[0] ."\">" . $newid ."</div></a>" ."<h2>".$i->title."</h2>".$i->confabulation_body ."<div class=\"author\">".$i->confabulation_pseudonym ."</div> <div style=\"clear:both;\"></div></div>"; } ?> The Environment My environment (in case though theoretically it should work fine still): Latest version of XAMPP Editor Tool: Dreamweaver Has anyone experienced such a bizarre behavior? Did I do something wrong? Is my laptop cursed?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now