Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8849389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:38:19+00:00 2026-06-14T12:38:19+00:00

I have used a CMS built with PHP and MySQL. It works great and

  • 0

I have used a CMS built with PHP and MySQL. It works great and I have fully customized it to my liking. The only thing now to do is make a more efficient way of loading the data. When a user wants to select an article I want the browser to stay on the same exact page/url without reloading or redirecting. Here is a demo of the CMS: DEMO LINK

For example, the above line of code was exerted from the homepage.php script. It is an anchor tag for the user to select to view the whole content of a particular article, which was only partially displayed in the homepage. When this link is clicked, the user is directed away from the homepage and taken to the article’s specific URL. How can I get the full article content page to load inside of the homepage and hide the original homepage content to avoid the page redirect problem. Is this something that can be done with this particular CMS? I can provide any PHP script from the CMS if needed. Thanks in advance.

ARCHIVE.php SCRIPT:

 <?php foreach ( $results['articles'] as $article ) { ?>
    <li>
      <h2>
        <span class="pubDate"><?php echo date('j F Y', $article->publicationDate)?></span><br><a href=".?action=viewArticle&amp;articleId=<?php echo $article->id?>"><?php echo htmlspecialchars( $article->title )?></a>
      </h2>
      <p class="summary">
        <?php if ( $imagePath = $article->getImagePath( IMG_TYPE_THUMB ) ) { ?>
          <a href=".?action=viewArticle&amp;articleId=<?php echo $article->id?>">

<div class="floated_child0" style="background-repeat:none; background-image:url('<?php echo $imagePath?>');"></div></a>
        <?php } ?>
      <?php echo htmlspecialchars( $article->summary )?>&nbsp;&nbsp;<a href=".?action=viewArticle&amp;articleId=<?php echo $article->id?>">(more)</a>
      </p>
    </li>
 <?php } ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:38:21+00:00Added an answer on June 14, 2026 at 12:38 pm

    If you can get the content of the article using ajax and put that content below that title of that article, for ex let say you have a php function in backend which you can call to get the content of article given the article id then you can make a GET ajax request to get the article content and put in the desired div. something like:

    <script language="javascript">
    $("#view_more").click(function(){
     var dataString = "id="+article_ID;
              $.ajax({
                    type: "GET",
                    url: 'http://myhost.com/articles/getArticleContent',
                    data: dataString,
                    success: function(response) {
                       $('div #description').html(response);
                    }
              });
              return false;
          });
    </script>
    

    update:27-11-2012
    you can try something like this, if that helps you understanding better. it may not be exactly what you want but I hope it will help you understanding how you can proceed.

    <?php foreach ( $results['articles'] as $article ) { ?>
        <li>
          <h2>
            <span class="pubDate"><?php echo date('j F Y', $article->publicationDate)?></span><br><a href=".?action=viewArticle&amp;articleId=<?php echo $article->id?>"><?php echo htmlspecialchars( $article->title )?></a>
          </h2>
          <p class="summary" id="<?php echo $article->id?>">
            <?php if ( $imagePath = $article->getImagePath( IMG_TYPE_THUMB ) ) { ?>
              <a href=".?action=viewArticle&amp;articleId=<?php echo $article->id?>">
    
    <div class="floated_child0" style="background-repeat:none; background-image:url('<?php echo $imagePath?>');"></div></a>
            <?php } ?>
          <?php echo htmlspecialchars( $article->summary )?>&nbsp;&nbsp;<a href="#" onclick="viewFullArticle(<?php echo $article->id?>)">(more)</a>
          </p>
        </li>
     <?php } ?>
    <script language="javascript">
    function viewFullArticle(article_ID){
     var dataString = "id="+article_ID;
              $.ajax({
                    type: "GET",
                    url: 'http://myhost.com/articles/getArticleContent',
                    data: dataString,
                    success: function(response) {
                       $('p #'+article_ID).html(response); //assuming response is everything you want to display within summary paragraph
                    }
              });
              return false;
          };
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have used Shibboleth to authenticate users. It works great. The issue is that
I have used auto complete textbox previously. That auto complete works only when i
I have never used a CMS before nor have I built a E-commerce site
We have used Joomla as an out-of-box CMS for our company website. Now we
I am a beginner at using mysql/phpmyadmin, and have never used a cms before.
I have a cms engine that I created not long back, I have used
I am creating a website without use of CMS...I have used Joomla before and
I have created a html/css template to be used within a CMS. I have
I've used N2 CMS for a while now, I've just updated to use MVC
I've not really used WP before but now I have to learn it and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.