开发者

About Disabling Page Parent Page & Go only clicking sub entities click

开发者 https://www.devze.com 2023-01-20 04:14 出处:网络
I have a website with a menu & different sub-entities in a page, that means sub entity pages under a parent page, i want to disable parent page, that means when i click parent page goes nowhere, o

I have a website with a menu & different sub-entities in a page, that means sub entity pages under a parent page, i want to disable parent page, that means when i click parent page goes nowhere, only goes when clicking on sub-enti开发者_如何学运维ty pages .. Let me know, how i can do that, i'm working on wordpress, i need this ASAP,please ..


Three options:

1 - outdated - look into the <iframe> tag, but I don't recommend this - it's outdated and unused for many good reasons.

2 - recommended:

  • make a template that looks like the main page.
  • Include it on each of the 'sub-entity' pages.
  • Put the 'sub-entity' content in as appropriate.

Now, you've got something that LOOKS like the parent page isn't moving. (should probably be done with PHP or something similar, but can be done with just HTML)

3 - not so good:

  • make a PHP page that outputs the sub-entity content.
  • Use a <form> to submit the page with some POST data.
  • Use the POST data to find which sub-entity page you want to output.

Also, the word sub-entity is not the right terminology. I assume you're talking about the children of the window's document body:

WINDOW [ HTML [ BODY [ ] ] ] is equivalent to your
PARENT PAGE [ SUB-ENTITY PAGES [ SUB-ENTITY PAGES [] ] ] which is similar to
WINDOW [ DOCUMENT [ BODY [] ] ]

Hope this helps, or at least gives you a starting point.

====================

To redirect to the home page when clicking ANYWHERE on the home page, use javascript:

<script type='text/javascript'>
  document.body.onclick = function() { window.location.href = "index.htm"; }
</script>

A link to the homepage is obviously

  <a href='index.htm'>HOME</a>
0

精彩评论

暂无评论...
验证码 换一张
取 消