Resource icon

Page as portal homepage

Anyone? I want to have a custom meta description for the page but I don't want the description page at the top. How do I do that?
I tried putting it in the PAGE CONTAINER template with a conditional but that failed. Maybe I did it wrong.
 
When I post the url that links to the home portal page it will only show the word Home and the url in the snippet, only if I link it to the forum it will show the board title and board meta description.

Any way to fix this?
This is what I'm still trying to figure out.
 
I tried putting it in the PAGE CONTAINER template with a conditional but that failed. Maybe I did it wrong.
Code:
<xf:if is="$xf.reply.containerKey == 'node-XX'">
    <Your head tags for node-XX>
</xf:if>
You can get your node-(XX) by going to ACP->Forums->Nodes then scroll down to the page you made and hover over it or right-click it and view properties. I have a Page named "Clock". If I hover over it, I see clock.46. So, to show code specifically to that page, putting 46 where those XXs are will work.
 
Last edited:
When I post the url that links to the home portal page it will only show the word Home and the url in the snippet, only if I link it to the forum it will show the board title and board meta description.
You need to create a conditional in PAGE_CONTAINER to split the two.

It'll be an if/else conditional like the above provided, but you'll need to find this code:
Code:
    <xf:set var="$siteName" value="{$xf.options.boardTitle}" />
    <xf:set var="$h1"><xf:h1 fallback="{$siteName}" /></xf:set>
    <xf:set var="$description"><xf:description /></xf:set>

And replace it with something like:
Code:
<xf:if is="$xf.reply.containerKey == 'node-XX'">
<xf:comment>Values set only for node-XX (or page XYZ)</xf:comment>
<xf:set var="$siteName" value="YourSite.Com?" />
    <xf:set var="$h1">My custom site's portal</xf:set>
    <xf:set var="$description">Custom description text</xf:set>
<xf:else />
<xf:comment>Original PAGE_CONTAINER values</xf:comment>
<xf:set var="$siteName" value="{$xf.options.boardTitle}" />
    <xf:set var="$h1"><xf:h1 fallback="{$siteName}" /></xf:set>
    <xf:set var="$description"><xf:description /></xf:set>
</xf:if>
 
Code:
<xf:if is="$xf.reply.containerKey == 'node-XX'">
    <Your head tags for node-XX>
<xf:else />
You can get your node-(XX) by going to ACP->Forums->Nodes then scroll down to the page you made and hover over it or right-click it and view properties. I have a Page named "Clock". If I hover over it, I see clock.46. So, to show code specifically to that page, putting 46 where those XXs are will work.

Got it to work but the code needs to be:

Code:
<xf:if is="$xf.reply.containerKey == 'node-XX'">
    <Your head tags for node-XX>
</xf:if>

Thank you!!!
 
  • Like
Reactions: frm
Got it to work but the code needs to be:

Code:
<xf:if is="$xf.reply.containerKey == 'node-XX'">
    <Your head tags for node-XX>
</xf:if>

Thank you!!!
Oversight on my part. I copied it from an if/else at like 2 a.m., without proofing; but I'm glad you caught it and understood. :)
 
So i've tried following the guide and put in the widgets correctly but nothings displaying at all?
 

Attachments

  • Screenshot_3.webp
    Screenshot_3.webp
    30.7 KB · Views: 82
Small question, I made a widget with recent posts and trying to change the thread titles size and weight which I can achieved with:

.structItem-title { font-size: 18px; font-weight: 700; }
However, naturally it also changed several other sections. Is it possible to just change the titles of the custom recent post widget?

Cheers
 
Following the guide to the letter, when I hit 'Home' I end up with:

Oops! We ran into some problems.
The requested page could not be found.
 
Following the guide to the letter, when I hit 'Home' I end up with:

Oops! We ran into some problems.
The requested page could not be found.

You've missed something somewhere :-) If you post some screenshots of your settings, nodes, etc then we can probably spot it.
 
Something as simple as adding a slash in front of the index page route can cause that kind of issue.

Bingo - I was missing the slash at the end. "pages/front" vs "pages/front/"

Too many late nights fiddling with the migration. I'm moving 900,000+ posts/40,000 members from SMF 2 to XF2 via XF1 import and upgrade.
 
OK, a simple dumb question and I hope it hasn't already been asked.

My forum is in the /forum/ subdirectory. Can this "front page" be placed on the root page as index.php or html or shtml as the case may be and my forum be situated and linked to in the /forum/ directory?

If so, this is absolutely super!
 
Top Bottom