XF 2.2 User Upgrade Page - Insert an #Anchor Link?

philmckrackon

Well-known member
I'm trying to add html to the user upgrade title. What I am really trying to do is insert an anchor link in between each upgrade option, but each is different so I figured the title would work.
The problem I have is each title html is different so if I use css it has to change each time (count?). Can this be accomplished or is there a better way?

al2.webp
 
Solution
As a follow up in case this may help some one in the future.

As a quick fix I created a template modification for the account_upgrades template.
Find: <xf:foreach loop="$available" value="$upgrade">
Replace (edit as needed):
Code:
$0
                  
<xf:if is="$upgrade.user_upgrade_id == 1">
    <a id ="goldar"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 3"/>
    <a id ="silver"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 4"/>
    <a id ="silverar"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 5"/>
    <a id ="lifetime"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 29"/>
    <a id ="bronze"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 30"/>
    <a id ="bronzear"></a>
<xf:elseif is="$upgrade.user_upgrade_id...
As a follow up in case this may help some one in the future.

As a quick fix I created a template modification for the account_upgrades template.
Find: <xf:foreach loop="$available" value="$upgrade">
Replace (edit as needed):
Code:
$0
                  
<xf:if is="$upgrade.user_upgrade_id == 1">
    <a id ="goldar"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 3"/>
    <a id ="silver"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 4"/>
    <a id ="silverar"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 5"/>
    <a id ="lifetime"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 29"/>
    <a id ="bronze"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 30"/>
    <a id ="bronzear"></a>
<xf:elseif is="$upgrade.user_upgrade_id == 31"/>
    <a id ="gold"></a>
</xf:if>

That was the quick fix but not dynamic as the upgrades change. For that I made a custom addon that adds a field to the upgrade page and dynamically inserts an anchor link.

anchor1.webp
 
Solution
Back
Top Bottom