JBJ Posted April 9, 2019 Share Posted April 9, 2019 Just download processwire and the skycraper template. Changed the "floor" field name to "floors", then went to the template skyscraper-list-item.php and change: <div class='uk-width-1-3 uk-width-small-1-5'> <?=$floors?><br /> <small class='uk-text-muted'>floors</small> </div> to <div class='uk-width-1-3 uk-width-small-1-5'> <?=$floorss?><br /> <small class='uk-text-muted'>floors</small> </div> Now all skycraper have "floor" as empty value. What I'm missing? ? Thanks! Link to comment Share on other sites More sharing options...
Autofahrn Posted April 9, 2019 Share Posted April 9, 2019 That $floors is just a variable set from the php file which actually includes the skyscraper-list-item.php. You'll have to modify the php file actually including this one (may be included multiple times). You may start looking in function renderSkyscraperListItem located in _func.php: // send to our view file in includes/skyscraper-list-item.php $out = files()->render('./includes/skyscraper-list-item.php', array( 'skyscraper' => $skyscraper, 'url' => $skyscraper->url, 'img' => $img, 'title' => $skyscraper->title, 'city' => $skyscraper->parent->get("title"), 'height' => $skyscraper->get('height|unknown'), 'floors' => $skyscraper->get('floors|unknown'), 'year' => $skyscraper->get('year|unknown'), 'summary' => summarizeText($skyscraper->get('body'), 500) )); ...and, of course, welcome to the forum! 2 Link to comment Share on other sites More sharing options...
JBJ Posted April 9, 2019 Author Share Posted April 9, 2019 14 hours ago, Autofahrn said: That $floors is just a variable set from the php file which actually includes the skyscraper-list-item.php. You'll have to modify the php file actually including this one (may be included multiple times). You may start looking in function renderSkyscraperListItem located in _func.php: // send to our view file in includes/skyscraper-list-item.php $out = files()->render('./includes/skyscraper-list-item.php', array( 'skyscraper' => $skyscraper, 'url' => $skyscraper->url, 'img' => $img, 'title' => $skyscraper->title, 'city' => $skyscraper->parent->get("title"), 'height' => $skyscraper->get('height|unknown'), 'floors' => $skyscraper->get('floors|unknown'), 'year' => $skyscraper->get('year|unknown'), 'summary' => summarizeText($skyscraper->get('body'), 500) )); ...and, of course, welcome to the forum! Thanks! Finally figure out how to do it ? 1 Link to comment Share on other sites More sharing options...
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