Jump to content

Alex Parra

Members
  • Posts

    6
  • Joined

  • Last visited

About Alex Parra

  • Birthday 04/27/1980

Profile Information

  • Gender
    Male
  • Location
    Lisbon, Portugal

Recent Profile Visitors

1,230 profile views

Alex Parra's Achievements

Newbie

Newbie (2/6)

3

Reputation

1

Community Answers

  1. Hello LostKobrakai, Thank you for the additional info about canonical meta tags. I'm aware and do not disagree with you. Still my preferred method is ONE url only. No need to redirect, no need to track canonical tags...
  2. Hi everyone! I haven't read the entire thread since 2013 but here goes a heads up for a SEO tip. Beware of content duplicates when using multiple categories. The posts/articles/pages should have only ONE accessible url. So this is bad: domain.tld/categ/article domain.tld/categ/sub/article This is good SEO: domain.tld/article Or domain.tld/categ/subcateg/article All other possibilities should redirect to the official (canonical) url. Short urls are better... But be sure to include relevant keywords. Hope it helps someone.
  3. Didn't know about wireRenderFile(...) Thank you LostKobrakai. For the situation at hand, Soma's tip seems more natural. But the wireRenderFile may be very useful in other ways... Thank you both.
  4. Ah! That looks much better... complete code below /** * site/config.php */ $config->appendTemplateFile = '_layout.php'; /** * site/templates/home.php */ $title = $page->title; $shop = $pages->get('/shops/mr-big'); $mainContent = $shop->render('partials/shop-intro.php', ['appendFile'=>null]); /** * site/templates/partials/shop-intro.php */ <div class="shop-intro"> <h2><?= $page->title ?></h2> <?php foreach( $page->shop_photos AS $photo ) : ?> <img src="<?= $photo->url ?>" /><br/> <?php endforeach; ?> <div class="shop-desc"> <?= html_entity_decode($page->shop_description) ?> </div> </div> /** * site/templates/_layout.php */ <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?= $title; ?></title> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <h1><?= $title; ?></h1> <div class="container"> <?= $mainContent ?> </div> </body> </html> I like it like this... If anyone has a better way, feel free to jump in.
  5. Hello LostKobrakai, That worked! Thinking some method of doing this should exist. Is this Module playfield or am I doing it wrong and there are more appropriate ways? My goal is to render a "snippet" of an existing page. Think latest news intro or blog list post intro.. Thanks for your reply.
  6. Hello everyone. I've found PW recently and I've been exploring/testing it... The everything is a Page is slowly sinking in. I'm currently trying to render a page in another (like a partial) like below: $shop = $pages->get('/shops/mr-big'); $mainContent = $shop->render('partials/shop-intro.php'); I also have set an $config->appendTemplateFile. How can I prevent the appendFile to be included for this partial rendering. I've search the forums and docs but could not find an answer... Thank you
×
×
  • Create New...